mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +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 {
|
public void stop() throws IOException {
|
||||||
if(offHook.tryAcquire()) offHook.release();
|
if(offHook.tryAcquire()) {
|
||||||
else hangUp();
|
reliabilityLayer.stop();
|
||||||
|
offHook.release();
|
||||||
|
} else {
|
||||||
|
hangUp();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
port.closePort();
|
port.closePort();
|
||||||
} catch(SerialPortException e) {
|
} catch(SerialPortException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user