From c4bf931b8079f6c8c21bed45d1744b5d78c8261e Mon Sep 17 00:00:00 2001 From: akwizgran <michael@briarproject.org> Date: Fri, 7 Dec 2012 15:03:54 +0000 Subject: [PATCH] Ensure the reliability layer is stopped when the modem is stopped. --- briar-core/src/net/sf/briar/plugins/modem/ModemImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/briar-core/src/net/sf/briar/plugins/modem/ModemImpl.java b/briar-core/src/net/sf/briar/plugins/modem/ModemImpl.java index a7beeeffc3..2961232287 100644 --- a/briar-core/src/net/sf/briar/plugins/modem/ModemImpl.java +++ b/briar-core/src/net/sf/briar/plugins/modem/ModemImpl.java @@ -92,8 +92,12 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener { } public void stop() throws IOException { - if(offHook.tryAcquire()) offHook.release(); - else hangUp(); + if(offHook.tryAcquire()) { + reliabilityLayer.stop(); + offHook.release(); + } else { + hangUp(); + } try { port.closePort(); } catch(SerialPortException e) { -- GitLab