Catch NullReferenceException while reconnecting

Exception thrown when no server is currently connected. See issue #19