Added a heartbeat thread to check whether the client's been unexpectedly d/c'ed from the server