bugfix: stop reading data from sockets which are pending closure