mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Removed unnecessary synchronization.
This commit is contained in:
@@ -80,13 +80,11 @@ class ModemPlugin implements DuplexPlugin, Modem.Callback {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchronized to avoid a race condition with resetModem()
|
public void stop() {
|
||||||
public synchronized void stop() {
|
|
||||||
running = false;
|
running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Synchronized to avoid a race condition with stop()
|
private boolean resetModem() {
|
||||||
private synchronized boolean resetModem() {
|
|
||||||
if(!running) return false;
|
if(!running) return false;
|
||||||
for(String portName : SerialPortList.getPortNames()) {
|
for(String portName : SerialPortList.getPortNames()) {
|
||||||
modem = modemFactory.createModem(this, portName);
|
modem = modemFactory.createModem(this, portName);
|
||||||
|
|||||||
Reference in New Issue
Block a user