Autoreconnect irc if the thread dies, or so

close unused sockets