Mercurial > stress-tester
changeset 569:c366887ec63e
bugfixes
author | Devel 2 |
---|---|
date | Tue, 26 Sep 2017 16:15:06 +0200 |
parents | e573828e24e5 |
children | 1304d9e5a8cd |
files | stress-tester/src/main/java/com/passus/st/client/http/HttpClient.java stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/HttpClient.java Tue Sep 26 16:14:51 2017 +0200 +++ b/stress-tester/src/main/java/com/passus/st/client/http/HttpClient.java Tue Sep 26 16:15:06 2017 +0200 @@ -223,7 +223,7 @@ worker.interrupt(); try { - worker.join(200); + worker.join(); } catch (Exception ignore) { } }
--- a/stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java Tue Sep 26 16:14:51 2017 +0200 +++ b/stress-tester/src/main/java/com/passus/st/client/http/HttpSynchClientWorker.java Tue Sep 26 16:15:06 2017 +0200 @@ -206,6 +206,15 @@ } @Override + public void close() { + synchronized (lock) { + eventsQueue.clear(); + super.close(); + lock.notifyAll(); + } + } + + @Override public void run() { synchronized (lock) { working = true; @@ -218,7 +227,7 @@ boolean nextPoll = true; do { - if (loopEnd) { + if (loopEnd || !working) { break; }