{"action":"created","issue":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/730","labels_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/730/labels{/name}","comments_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/730/comments","events_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/730/events","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/730","id":115364496,"number":730,"title":"Multiple conn:send() not working","user":{"login":"positron96","id":2095278,"avatar_url":"https://avatars.githubusercontent.com/u/2095278?v=3","gravatar_id":"","url":"https://api.github.com/users/positron96","html_url":"https://github.com/positron96","followers_url":"https://api.github.com/users/positron96/followers","following_url":"https://api.github.com/users/positron96/following{/other_user}","gists_url":"https://api.github.com/users/positron96/gists{/gist_id}","starred_url":"https://api.github.com/users/positron96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/positron96/subscriptions","organizations_url":"https://api.github.com/users/positron96/orgs","repos_url":"https://api.github.com/users/positron96/repos","events_url":"https://api.github.com/users/positron96/events{/privacy}","received_events_url":"https://api.github.com/users/positron96/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-05T20:12:17Z","updated_at":"2015-11-10T11:39:53Z","closed_at":"2015-11-06T14:17:43Z","body":"When I was on a stable build (0.9.6-dev_20150704), the code like this worked correctly:\r\n````\r\n    connection:on (\"receive\",\r\n    function (conn, req)\r\n        conn:send(\"HTTP/1.0 200 OK\\n\")\r\n        conn:send(\"Server: ESP (nodeMCU)\\n\")\r\n        conn:send(\"Content-Length: 1\\n\\n\")\r\n        conn:send(\"a\")\r\n        conn:close()\r\n    end )\r\n````\r\nThis worked for a client socker as well as a server socket.\r\n\r\nNow I moved to dev build that says: \r\n````\r\nNodeMCU custom build by frightanic.com\r\n\tbranch: dev\r\n\tcommit: d8c6fe0b25142f6ae866c18c3bcb3d0538d4baaf\r\n\tSSL: false\r\n\tmodules: node,file,gpio,wifi,net,pwm,tmr,uart,ow\r\n build \tbuilt on: 2015-11-03 20:47\r\n````\r\nAnd only first conn:send actually sends, all following calls get silently discarded. I now need to store the lines into a table and join table into a string which is probably a waste of memory.\r\n\r\nIs it a bug or is it intended?"},"comment":{"url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/comments/155396953","html_url":"https://github.com/nodemcu/nodemcu-firmware/issues/730#issuecomment-155396953","issue_url":"https://api.github.com/repos/nodemcu/nodemcu-firmware/issues/730","id":155396953,"user":{"login":"dwery","id":249355,"avatar_url":"https://avatars.githubusercontent.com/u/249355?v=3","gravatar_id":"","url":"https://api.github.com/users/dwery","html_url":"https://github.com/dwery","followers_url":"https://api.github.com/users/dwery/followers","following_url":"https://api.github.com/users/dwery/following{/other_user}","gists_url":"https://api.github.com/users/dwery/gists{/gist_id}","starred_url":"https://api.github.com/users/dwery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwery/subscriptions","organizations_url":"https://api.github.com/users/dwery/orgs","repos_url":"https://api.github.com/users/dwery/repos","events_url":"https://api.github.com/users/dwery/events{/privacy}","received_events_url":"https://api.github.com/users/dwery/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T11:39:53Z","updated_at":"2015-11-10T11:39:53Z","body":"This seems to be a common issue, it happened to me too as it worked on 0.9.5. maybe the http example or documentation could be amended or a better example provided. I resorted to concatenating a couple of strings but it's not very classy,"}}