have sex with valgrind
ensure to close the connection file descriptor only after we remove
it from connections, otherwise the sender thread will try to use
a closed file descriptor for send messages.