{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/socket.io/issues/2031","labels_url":"https://api.github.com/repos/Automattic/socket.io/issues/2031/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/socket.io/issues/2031/comments","events_url":"https://api.github.com/repos/Automattic/socket.io/issues/2031/events","html_url":"https://github.com/Automattic/socket.io/issues/2031","id":59691458,"number":2031,"title":"Half close on error","user":{"login":"nuclearace","id":1211049,"avatar_url":"https://avatars.githubusercontent.com/u/1211049?v=3","gravatar_id":"","url":"https://api.github.com/users/nuclearace","html_url":"https://github.com/nuclearace","followers_url":"https://api.github.com/users/nuclearace/followers","following_url":"https://api.github.com/users/nuclearace/following{/other_user}","gists_url":"https://api.github.com/users/nuclearace/gists{/gist_id}","starred_url":"https://api.github.com/users/nuclearace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuclearace/subscriptions","organizations_url":"https://api.github.com/users/nuclearace/orgs","repos_url":"https://api.github.com/users/nuclearace/repos","events_url":"https://api.github.com/users/nuclearace/events{/privacy}","received_events_url":"https://api.github.com/users/nuclearace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-03T19:24:05Z","updated_at":"2015-03-06T06:58:37Z","closed_at":null,"body":"![](https://i.imgur.com/S7O8aQK.png)\r\n\r\nThe underlying transport does not close, yet a disconnect event is emitted. Client still thinks it is connected."},"comment":{"url":"https://api.github.com/repos/Automattic/socket.io/issues/comments/77515642","html_url":"https://github.com/Automattic/socket.io/issues/2031#issuecomment-77515642","issue_url":"https://api.github.com/repos/Automattic/socket.io/issues/2031","id":77515642,"user":{"login":"Mewte","id":4381093,"avatar_url":"https://avatars.githubusercontent.com/u/4381093?v=3","gravatar_id":"","url":"https://api.github.com/users/Mewte","html_url":"https://github.com/Mewte","followers_url":"https://api.github.com/users/Mewte/followers","following_url":"https://api.github.com/users/Mewte/following{/other_user}","gists_url":"https://api.github.com/users/Mewte/gists{/gist_id}","starred_url":"https://api.github.com/users/Mewte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mewte/subscriptions","organizations_url":"https://api.github.com/users/Mewte/orgs","repos_url":"https://api.github.com/users/Mewte/repos","events_url":"https://api.github.com/users/Mewte/events{/privacy}","received_events_url":"https://api.github.com/users/Mewte/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T06:58:37Z","updated_at":"2015-03-06T06:58:37Z","body":"I found out that if I do: \r\n`````javascript\r\n\tclient.on(\"error\", function(){\r\n\t\tclient.disconnect();\r\n\t});\r\n`````\r\nI can force the client to disconnect, though it won't invoke the clients auto reconnect. I could possibly emit an \"error\" event to the client and let the client decide how it should be handled (and possibly invoke the reconnection manually) Perhaps this is intended as it does give you more control over how errors are handled."}}