Only send message bundle if not stopped

This commit is contained in:
Florian Reimair 2020-03-26 17:01:43 +01:00
parent 4ff4801e5c
commit 50ba2cd740
No known key found for this signature in database
GPG key ID: 05634D8D7A7954C8

View file

@ -284,7 +284,7 @@ public class Connection implements HasCapabilities, Runnable, MessageListener {
if (!stopped) {
synchronized (lock) {
BundleOfEnvelopes current = queueOfBundles.poll();
if (current != null) {
if (current != null && !stopped) {
if (current.getEnvelopes().size() == 1) {
protoOutputStream.writeEnvelope(current.getEnvelopes().get(0));
} else {