Skip to content

Commit

Permalink
Adding Null check in WebSocketReciever when attempting to join thread
Browse files Browse the repository at this point in the history
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
  • Loading branch information
jpwsutton committed Aug 25, 2017
1 parent 783802c commit adc1160
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void stop() {

}
}
if(closed && !Thread.currentThread().equals(receiverThread)) {
if(closed && !Thread.currentThread().equals(receiverThread) && (receiverThread != null)) {
try {
// Wait for the thread to finish
//This must not happen in the synchronized block, otherwise we can deadlock ourselves!
Expand Down

0 comments on commit adc1160

Please sign in to comment.