{"action":"closed","issue":{"url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/10","labels_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/10/comments","events_url":"https://api.github.com/repos/TakahikoKawasaki/nv-websocket-client/issues/10/events","html_url":"https://github.com/TakahikoKawasaki/nv-websocket-client/issues/10","id":107843000,"number":10,"title":"Initial connection timeout?","user":{"login":"MatthewMah","id":7673282,"avatar_url":"https://avatars.githubusercontent.com/u/7673282?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewMah","html_url":"https://github.com/MatthewMah","followers_url":"https://api.github.com/users/MatthewMah/followers","following_url":"https://api.github.com/users/MatthewMah/following{/other_user}","gists_url":"https://api.github.com/users/MatthewMah/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewMah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewMah/subscriptions","organizations_url":"https://api.github.com/users/MatthewMah/orgs","repos_url":"https://api.github.com/users/MatthewMah/repos","events_url":"https://api.github.com/users/MatthewMah/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewMah/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-23T03:29:54Z","updated_at":"2015-09-23T18:20:29Z","closed_at":"2015-09-23T18:20:29Z","body":"Is there currently the capability to set the initial connection timeout for the socket connection? I think this would use the socket method `connect(SocketAddress endpoint, int timeout) `. \r\n\r\nMy code fragment looks like this, and for timeout_ms =6000, the timeout for the initial connection is highly variable, but can definitely be > 30 sec. The SO_TIMEOUT does not seem to have any effect on the initial connection timeout.  \r\n```\r\nwebsocket = factory.createSocket(connectionURI);\r\nSocket s = websocket.getSocket();\r\ns.setSoTimeout(timeout_ms);\r\nwebsocket.addListener(this);\r\nwebsocket.connect();\r\n```"}}