Skip to content
Snippets Groups Projects
Commit 879f1a06 authored by bontric's avatar bontric
Browse files

fix MailboxProtocol termination

parent baafb166
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,7 @@ public class MailboxProtocol implements Runnable {
writingThread.interrupt();
if (LOG.isLoggable(INFO))
LOG.info(e.toString());
terminatePendingRequests();
}
}
}
......@@ -119,9 +120,10 @@ public class MailboxProtocol implements Runnable {
}
} catch (IOException | InterruptedException e) {
if (aborted.compareAndSet(false, true)) {
writingThread.interrupt();
readingThread.interrupt();
if (LOG.isLoggable(INFO))
LOG.info(e.toString());
terminatePendingRequests();
}
}
}
......@@ -178,11 +180,11 @@ public class MailboxProtocol implements Runnable {
}
}
public void stop() throws IOException {
public void stop() {
if (aborted.compareAndSet(false, true)) {
readingThread.interrupt();
writingThread.interrupt();
mailboxBdfReader.close();
terminatePendingRequests();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment