BUGFIX: Ensure that when a socket's closed the local read buffer's reset (write is OK).