Make sure data is still read out if socket was closed