mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
If the modem is off the hook when it's stopped, hang up.
This commit is contained in:
@@ -91,6 +91,8 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
||||
}
|
||||
|
||||
public void stop() throws IOException {
|
||||
if(offHook.tryAcquire()) offHook.release();
|
||||
else hangUp();
|
||||
try {
|
||||
port.closePort();
|
||||
} catch(SerialPortException e) {
|
||||
|
||||
Reference in New Issue
Block a user