Close connection properly when the socket dies.

This avoids flooding logs with messages output by asyncio:
"socket.send() raised exception."

Fix #23 (hopefully).