Solution: wait for monitor to stop resp. unregister monitor before closing monitored socket.
Attach a file by drag & drop or click to upload