mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 09:18:08 +02:00
dont break when socket is pre-closed
This commit is contained in:
@@ -520,8 +520,10 @@ class SocketChild:
|
|||||||
self.conn.sendall(f'{status}'.encode('ascii'))
|
self.conn.sendall(f'{status}'.encode('ascii'))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print_error(f'Failed to send exit status of socket child with error: {e}')
|
print_error(f'Failed to send exit status of socket child with error: {e}')
|
||||||
self.conn.shutdown(socket.SHUT_RDWR)
|
with suppress(OSError):
|
||||||
self.conn.close()
|
self.conn.shutdown(socket.SHUT_RDWR)
|
||||||
|
with suppress(OSError):
|
||||||
|
self.conn.close()
|
||||||
|
|
||||||
def handle_creation(self) -> bool:
|
def handle_creation(self) -> bool:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user