handle more errors the right way, refs #144
This commit is contained in:
parent
de67d36cd6
commit
11fd918d62
@ -35,7 +35,7 @@ class Client(ABC):
|
|||||||
try:
|
try:
|
||||||
data = self.multiprocessingPipe.get()
|
data = self.multiprocessingPipe.get()
|
||||||
self.send(data)
|
self.send(data)
|
||||||
except (EOFError, OSError):
|
except (EOFError, OSError, ValueError):
|
||||||
run = False
|
run = False
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Exception on client multiprocessing queue")
|
logger.exception("Exception on client multiprocessing queue")
|
||||||
@ -53,9 +53,12 @@ class Client(ABC):
|
|||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.conn.close()
|
self.conn.close()
|
||||||
|
if self.multiprocessingPipe is not None:
|
||||||
self.multiprocessingPipe.close()
|
self.multiprocessingPipe.close()
|
||||||
|
|
||||||
def mp_send(self, data):
|
def mp_send(self, data):
|
||||||
|
if self.multiprocessingPipe is None:
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
self.multiprocessingPipe.put(data, block=False)
|
self.multiprocessingPipe.put(data, block=False)
|
||||||
except Full:
|
except Full:
|
||||||
|
Loading…
Reference in New Issue
Block a user