From the mIRC help file:
Check for timed out connection
Pings the server every so often to check that the connection is okay.
I don't know (and I'm assuming that you don't either) what that "every so often" translates to in terms of minutes. It might be 5, or maybe 10... who knows. My guess as to what happened to you is that "every so often" time didn't pass yet when you were disconnected, which means that it would've worked sooner or later if you hadn't sent that message, anyway.
An option for the user to tell mIRC what that "every so often" means in terms of seconds would be a great feature suggestion, in my opinion. You might want to post it in the Feature Suggestions forum.