Local mIRC Bot timing out after some time?

Since it’s failing on the read() it might be the OS’s Power Settings turning the harddrive off.