Do not try to drain a socket when there is no data waiting
authorFabian Keil <fk@fabiankeil.de>
Tue, 1 Jan 2013 22:11:08 +0000 (22:11 +0000)
committerFabian Keil <fk@fabiankeil.de>
Tue, 1 Jan 2013 22:11:08 +0000 (22:11 +0000)
commitf1a1b6181f2803a8e72edf8e262e8817c7519fa4
treefe08f2a8fedbc42c8adecae6e1dbbfbd775f7336
parent152b7786e42b6abae1710dd51a9eb5910d62d9e9
Do not try to drain a socket when there is no data waiting

... at the time drain_and_close_socket() is called.

As Lee noticed it causes problems on Windows, most likely because
read_socket() is blocking which isn't even wrong and could also
happen on other platforms.
jbsockets.c