Fix reconnection when IRC connection is lost.