We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c5d43ff + f0eae3a commit f8db293Copy full SHA for f8db293
1 file changed
org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/internal/CommsSender.java
@@ -75,10 +75,12 @@ public void stop() {
75
running = false;
76
if (!Thread.currentThread().equals(sendThread)) {
77
try {
78
- // first notify get routine to finish
79
- clientState.notifyQueueLock();
80
- // Wait for the thread to finish.
81
- sendThread.join();
+ while(sendThread.isAlive()){
+ // first notify get routine to finish
+ clientState.notifyQueueLock();
+ // Wait for the thread to finish.
82
+ sendThread.join(100);
83
+ }
84
}
85
catch (InterruptedException ex) {
86
0 commit comments