Issue #15. Implemented mechanism for tcp layer, to clean all its queues before dropping the socket.