Added an atomic boolean that can be used to check if the connection is still alive.