Skip to content

Commit fa46ff7

Browse files
committed
Merge pull request TooTallNate#28 from xpepermint/master
Crtical fix inside run() loop
2 parents 936adf8 + 89ee2d3 commit fa46ff7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/net/tootallnate/websocket/WebSocketClient.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ public void run() {
218218
}
219219
} catch (IOException ex) {
220220
onIOError(conn, ex);
221-
} catch (NoSuchAlgorithmException ex) {
221+
} catch (Exception ex) {
222+
// NullPointerException is the most common error that can happen here
223+
// (e.g.when connection closes immediately)
224+
// TODO: user should handle that kind of events my himself
222225
ex.printStackTrace();
223226
}
224227
}

0 commit comments

Comments
 (0)