Fix for OKH IllegalStateException.

// FREEBIE

Fixes #2501
This commit is contained in:
Moxie Marlinspike 2015-02-20 12:38:26 -08:00
parent 6280ef4ab8
commit 8a2caeef3d

View File

@ -188,7 +188,13 @@ public class WebSocketConnection {
while (newSocket()) {
try {
Response response = webSocket.connect(Client.this);
Response response;
try {
response = webSocket.connect(Client.this);
} catch (IllegalStateException e) {
throw new IOException(e);
}
if (response.code() == 101) {
onConnected();