gthread: handle removed socket in the select loop

when it happend there are good chance the socket has been removed because it timeouted on the other end. So ignore it.

fix #1258
This commit is contained in:
benoitc 2016-05-21 00:08:59 +02:00
parent 20bde96e14
commit 44d3ac8451

View File

@ -179,6 +179,9 @@ class ThreadWorker(base.Worker):
except EnvironmentError as e:
if e.errno != errno.EBADF:
raise
except KeyError:
# already removed by the system, continue
pass
# close the socket
conn.close()