summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--device/device.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/device/device.go b/device/device.go
index 091c8d4..1af9fe0 100644
--- a/device/device.go
+++ b/device/device.go
@@ -368,6 +368,8 @@ func (device *Device) RemoveAllPeers() {
}
func (device *Device) Close() {
+ device.ipcMutex.Lock()
+ defer device.ipcMutex.Unlock()
device.state.Lock()
defer device.state.Unlock()
if device.isClosed() {