Skip to content

Commit 1c13ced

Browse files
committed
Close socket on disconnect
As per issue altdesktop#137, sockets are not closed when the bus is disconnected. This results in users receiving warnings about unclosed sockets. This PR adds a call to the socket's `close` method during `disconnect`. Closes altdesktop#137
1 parent ab566e1 commit 1c13ced

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dbus_next/message_bus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def disconnect(self):
386386
self._user_disconnect = True
387387
try:
388388
self._sock.shutdown(socket.SHUT_RDWR)
389+
self._sock.close()
389390
except Exception:
390391
logging.warning('could not shut down socket', exc_info=True)
391392

0 commit comments

Comments
 (0)