mIRC has a few different features to help with disconnecting.
In mIRC options: (alt + O)
Connect > Options >
Reconnect on Disconnection
Check for Timed Out Connection (this one could cause issues)
Retry Button (decide how often and how many times you want to attempt to reconnect when disconnected)