Skip to content

Commit b6039aa

Browse files
committed
Merge branch 'master' of github.com:TooTallNate/Java-WebSocket
2 parents 0786b51 + f28a37a commit b6039aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)