mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Ensure the reliability layer is stopped when the modem is stopped.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user