mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 18:45:20 -04:00
Retry on broken pipe when writing to control
This commit is contained in:
@@ -648,8 +648,13 @@ class ServerLoop(object):
|
||||
if iswindows:
|
||||
self.control_in.sendall(what)
|
||||
else:
|
||||
self.control_in.write(what)
|
||||
self.control_in.flush()
|
||||
try:
|
||||
self.control_in.write(what)
|
||||
self.control_in.flush()
|
||||
except BrokenPipeError:
|
||||
self.create_control_connection()
|
||||
self.control_in.write(what)
|
||||
self.control_in.flush()
|
||||
|
||||
def wakeup(self):
|
||||
self.write_to_control(WAKEUP)
|
||||
|
||||
Reference in New Issue
Block a user