diff options
Diffstat (limited to 'device/device.go')
-rw-r--r-- | device/device.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/device/device.go b/device/device.go index 5644c8a..7717494 100644 --- a/device/device.go +++ b/device/device.go @@ -172,6 +172,11 @@ func (device *Device) upLocked() error { return err } + // The IPC set operation waits for peers to be created before calling Start() on them, + // so if there's a concurrent IPC set request happening, we should wait for it to complete. + device.ipcMutex.Lock() + defer device.ipcMutex.Unlock() + device.peers.RLock() for _, peer := range device.peers.keyMap { peer.Start() |