Skip to content
Snippets Groups Projects
Commit f9ec4837 authored by akwizgran's avatar akwizgran
Browse files

If the modem is off the hook when it's stopped, hang up.

parent 584f7de0
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
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