NativeSerialPort: synchronize close()

thobaben_serialize
Harald Wolff 2014-05-16 14:48:18 +02:00
parent a6a663a2f2
commit a8fd32409d
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ public class NativeSerialPort extends SerialPort {
}
@Override
public void close() {
public synchronized void close() {
if (nativeHandle >= 0)
{
System.err.println(String.format("NativeSerialPort: Closing nativeHandle %d",nativeHandle));