Ignore None-socket in ipc.on_timeout

This commit is contained in:
Florian Bruhin 2016-11-08 11:07:58 +01:00
parent f271081012
commit 57ee378ec5

View File

@ -362,6 +362,9 @@ class IPCServer(QObject):
@pyqtSlot()
def on_timeout(self):
"""Cancel the current connection if it was idle for too long."""
if self._socket is None:
log.ipc.error("on_timeout got called with None socket!")
return
log.ipc.error("IPC connection timed out "
"(socket 0x{:x}).".format(id(self._socket)))
self._socket.disconnectFromServer()