This usually means that the IRC server is closing your connection for being idle. mIRC has a "check for timed out connection" in the mIRC Options Connect/Options dialog. This pings the server every so often to ensure that the connection is still alive. If the connection is not alive, this results in a disconnection and a subsequent reconnect attempt.