{"action":"created","issue":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/1241","repository_url":"https://api.github.com/repos/unbit/uwsgi","labels_url":"https://api.github.com/repos/unbit/uwsgi/issues/1241/labels{/name}","comments_url":"https://api.github.com/repos/unbit/uwsgi/issues/1241/comments","events_url":"https://api.github.com/repos/unbit/uwsgi/issues/1241/events","html_url":"https://github.com/unbit/uwsgi/issues/1241","id":150822648,"number":1241,"title":"Websocket server does not receive all sent messages","user":{"login":"michaelimfeld","id":10922984,"avatar_url":"https://avatars.githubusercontent.com/u/10922984?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelimfeld","html_url":"https://github.com/michaelimfeld","followers_url":"https://api.github.com/users/michaelimfeld/followers","following_url":"https://api.github.com/users/michaelimfeld/following{/other_user}","gists_url":"https://api.github.com/users/michaelimfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelimfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelimfeld/subscriptions","organizations_url":"https://api.github.com/users/michaelimfeld/orgs","repos_url":"https://api.github.com/users/michaelimfeld/repos","events_url":"https://api.github.com/users/michaelimfeld/events{/privacy}","received_events_url":"https://api.github.com/users/michaelimfeld/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-25T10:59:17Z","updated_at":"2016-04-27T19:47:40Z","closed_at":null,"body":"Hi, \r\nI'm coding websocket webapps with python web.py and uwsgi (2.0.12) and I'm currently having the following issue:\r\nWhen I send two messages quickly after eachother from the javascript, my backend only receives the first message but not the second. Why do I only receive the first message?\r\n\r\n```javascript\r\nws.send(\"message1\");\r\nws.send(\"message2\");\r\n```\r\nIn my backend I do a select on the websocket_fd:\r\n```python\r\nwebsocket_fd = uwsgi.connection_fd()\r\ninputs = [websocket_fd]\r\nreadable, _, _ = select.select(inputs, [], [], 1.0)\r\n```\r\nAnd if the socket becomes readable I read the data from the websocket client:\r\n```python\r\ndata = uwsgi.websocket_recv_nb()\r\n```\r\nWhen I refresh the page in my browser the backend receives the rest of the messages (in this case message2). So for me it looks like there's something like a buffer which gets flushed on a page refresh. \r\n\r\nIf I send the second message with a delay everything works as expected.  I assume the browser does send the two messages as one and uwsgi can somehow not handle it.\r\n\r\nI appreciate any help.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/unbit/uwsgi/issues/comments/215206946","html_url":"https://github.com/unbit/uwsgi/issues/1241#issuecomment-215206946","issue_url":"https://api.github.com/repos/unbit/uwsgi/issues/1241","id":215206946,"user":{"login":"xrmx","id":12932,"avatar_url":"https://avatars.githubusercontent.com/u/12932?v=3","gravatar_id":"","url":"https://api.github.com/users/xrmx","html_url":"https://github.com/xrmx","followers_url":"https://api.github.com/users/xrmx/followers","following_url":"https://api.github.com/users/xrmx/following{/other_user}","gists_url":"https://api.github.com/users/xrmx/gists{/gist_id}","starred_url":"https://api.github.com/users/xrmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrmx/subscriptions","organizations_url":"https://api.github.com/users/xrmx/orgs","repos_url":"https://api.github.com/users/xrmx/repos","events_url":"https://api.github.com/users/xrmx/events{/privacy}","received_events_url":"https://api.github.com/users/xrmx/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T19:47:39Z","updated_at":"2016-04-27T19:47:39Z","body":"Thanks for reporting. Could you please upload a reproducer somewhere?"}}