handle socket timeouts, etc