Skip to content

Commit adc1160

Browse files
committed
Adding Null check in WebSocketReciever when attempting to join thread
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
1 parent 783802c commit adc1160

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket

org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/websocket/WebSocketReceiver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void stop() {
7878

7979
}
8080
}
81-
if(closed && !Thread.currentThread().equals(receiverThread)) {
81+
if(closed && !Thread.currentThread().equals(receiverThread) && (receiverThread != null)) {
8282
try {
8383
// Wait for the thread to finish
8484
//This must not happen in the synchronized block, otherwise we can deadlock ourselves!

0 commit comments

Comments
 (0)