Skip to content

Commit 7413bd2

Browse files
committed
Fix lack of error checking.
1 parent 17b606d commit 7413bd2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ func subHandler(incoming chan mqttCallback, xsel *xselection, hashcache *cache.C
139139
// We call syncClips with the new primary contents and set xclipboard
140140
// to getMemClipboard. This guarantee that we'll never sync from the
141141
// clipboard to the just received primary.
142-
syncClips(broker, xsel, mqttmsg.Message, xsel.getMemClipboard())
142+
if _, err := syncClips(broker, xsel, mqttmsg.Message, xsel.getMemClipboard()); err != nil {
143+
log.Debug(err)
144+
globalMutex.Unlock()
145+
continue
146+
}
143147
}
144148
globalMutex.Unlock()
145149
}

0 commit comments

Comments
 (0)