Hrrm, what seems to be the issue? If you are getting disconnected after being idle for a while, it may be an issue with either your router or your ISP closing off idle connections. You might want to look at some form of timer to periodically "look" or some other harmless command to make sure you're not considered idle.
Comments
It's not my day today, it seems