made timeouts longer, and added a catch for socketexception in heartbeat routine