{"action":"closed","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/1358","labels_url":"https://api.github.com/repos/square/okhttp/issues/1358/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/1358/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/1358/events","html_url":"https://github.com/square/okhttp/issues/1358","id":56145993,"number":1358,"title":"Async request to invalid port hangs","user":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/square/okhttp/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/square/okhttp/milestones/11","labels_url":"https://api.github.com/repos/square/okhttp/milestones/11/labels","id":854043,"number":11,"title":"2.3","description":"","creator":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":9,"state":"open","created_at":"2014-11-05T03:42:15Z","updated_at":"2015-02-23T04:26:54Z","due_on":"2015-03-09T04:00:00Z","closed_at":null},"comments":0,"created_at":"2015-02-01T00:28:39Z","updated_at":"2015-02-23T04:26:54Z","closed_at":"2015-02-23T04:26:54Z","body":"An async request to an invalid port like, `http://localhost:70000` causes an exception to be logged, but does not result in a call to `com.squareup.okhttp.Callback#onFailure`.  Here is the exception I see printed to stderr.\r\n\r\n```\r\nException in thread \"OkHttp Dispatcher\" \r\njava.lang.IllegalArgumentException: port out of range:70000\r\n\tat java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)\r\n\tat java.net.InetSocketAddress.<init>(InetSocketAddress.java:188)\r\n\tat com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:267)\r\n\tat com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:240)\r\n\tat com.squareup.okhttp.internal.http.RouteSelector.nextUnconnected(RouteSelector.java:156)\r\n\tat com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:130)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:312)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:235)\r\n\tat com.squareup.okhttp.Call.getResponse(Call.java:262)\r\n\tat com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:219)\r\n\tat com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:192)\r\n\tat com.squareup.okhttp.Call.access$100(Call.java:34)\r\n\tat com.squareup.okhttp.Call$AsyncCall.execute(Call.java:156)\r\n\tat com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"}}