Skip to content

Commit 6b85175

Browse files
committed
Merge pull request TooTallNate#113 from DanielYWoo/master
pull request for the issue TooTallNate#112
2 parents aeb04e5 + ccafd73 commit 6b85175

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/org/java_websocket/client/WebSocketClient.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ public void run() {
192192
interruptableRun();
193193

194194
try {
195-
selector.close();
195+
if (selector != null) // if the initialization in <code>tryToConnect</code> fails, it could be null
196+
selector.close();
196197
} catch ( IOException e ) {
197198
onError( e );
198199
}

0 commit comments

Comments
 (0)