Better coverage, dunno howto force socket.close() to raise