{"action":"created","issue":{"url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/188","labels_url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/188/comments","events_url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/188/events","html_url":"https://github.com/socketio/socket.io-client-swift/issues/188","id":107540295,"number":188,"title":"[ERROR] SocketIOClient: Invalid HTTP upgrade","user":{"login":"yannickl","id":798235,"avatar_url":"https://avatars.githubusercontent.com/u/798235?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickl","html_url":"https://github.com/yannickl","followers_url":"https://api.github.com/users/yannickl/followers","following_url":"https://api.github.com/users/yannickl/following{/other_user}","gists_url":"https://api.github.com/users/yannickl/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickl/subscriptions","organizations_url":"https://api.github.com/users/yannickl/orgs","repos_url":"https://api.github.com/users/yannickl/repos","events_url":"https://api.github.com/users/yannickl/events{/privacy}","received_events_url":"https://api.github.com/users/yannickl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/socketio/socket.io-client-swift/labels/unconfirmed","name":"unconfirmed","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2015-09-21T15:42:18Z","updated_at":"2015-09-28T18:38:34Z","closed_at":null,"body":"Hi,\r\n\r\nI'm facing an issue that I don't understand and I need help. With the new version of the client I have random connection problem which display these logs:\r\n\r\n```\r\nLog SocketIOClient: Adding handler for event: disconnect\r\nLog SocketIOClient: Adding handler for event: error\r\nLog SocketIOClient: Adding engine\r\nLog SocketEngine: Starting engine\r\nLog SocketEngine: Handshaking\r\nERROR SocketIOClient: Invalid HTTP upgrade\r\nLog SocketIOClient: Handling event: error with data: (\r\n    \"Invalid HTTP upgrade\"\r\n)\r\nLog SocketIOClient: Disconnected: Invalid HTTP upgrade\r\nLog SocketEngine: Engine is being closed. Fast: 1\r\nLog SocketIOClient: Handling event: disconnect with data: (\r\n    \"Invalid HTTP upgrade\"\r\n)\r\nLog SocketEngine: Got message: 40\r\nLog SocketParser: Parsing 0\r\nLog SocketParser: Decoded packet as: SocketPacket {type: 0; data: []; id: -1; placeholders: 0; nsp: /}\r\nLog SocketIOClient: Socket connected\r\nLog SocketIOClient: Handling event: connect with data: \r\nGot event: connect, with items: nil\r\nLog SocketIOClient: Client is being deinit\r\nLog SocketEngine: Engine is being closed. Fast: 1\r\nLog SocketEngine: Engine is being deinit\r\n```\r\n\r\nOn the server (node.js 4.1.0, socket.io 1.3.7) I have a \"handshake\" and a `connection`  event. It happens on iOS 8.x and 9.x (iPads).\r\nWith the previous version and swift 1.x everything  worked well, but now it randomly failed. Have you some ideas?"},"comment":{"url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/comments/143837625","html_url":"https://github.com/socketio/socket.io-client-swift/issues/188#issuecomment-143837625","issue_url":"https://api.github.com/repos/socketio/socket.io-client-swift/issues/188","id":143837625,"user":{"login":"yannickl","id":798235,"avatar_url":"https://avatars.githubusercontent.com/u/798235?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickl","html_url":"https://github.com/yannickl","followers_url":"https://api.github.com/users/yannickl/followers","following_url":"https://api.github.com/users/yannickl/following{/other_user}","gists_url":"https://api.github.com/users/yannickl/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickl/subscriptions","organizations_url":"https://api.github.com/users/yannickl/orgs","repos_url":"https://api.github.com/users/yannickl/repos","events_url":"https://api.github.com/users/yannickl/events{/privacy}","received_events_url":"https://api.github.com/users/yannickl/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T18:38:34Z","updated_at":"2015-09-28T18:38:34Z","body":"The first tests are positives. I'll keep you in touch in the next few days. :+1: "}}