mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Retry on broken pipe when writing to control
This commit is contained in:
parent
62a0bdad07
commit
593eeaf9ea
@ -648,8 +648,13 @@ class ServerLoop(object):
|
|||||||
if iswindows:
|
if iswindows:
|
||||||
self.control_in.sendall(what)
|
self.control_in.sendall(what)
|
||||||
else:
|
else:
|
||||||
self.control_in.write(what)
|
try:
|
||||||
self.control_in.flush()
|
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):
|
def wakeup(self):
|
||||||
self.write_to_control(WAKEUP)
|
self.write_to_control(WAKEUP)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user