Removed unnecessary synchronization.

This commit is contained in:
akwizgran
2012-11-27 00:09:33 +00:00
parent 116e194185
commit 4869a8034b

View File

@@ -80,13 +80,11 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
return false;
}
// Synchronized to avoid a race condition with resetModem()
public synchronized void stop() {
public void stop() {
running = false;
}
// Synchronized to avoid a race condition with stop()
private synchronized boolean resetModem() {
private boolean resetModem() {
if(!running) return false;
for(String portName : SerialPortList.getPortNames()) {
modem = modemFactory.createModem(this, portName);