code: function () {
          stopHeartBeatInterval(ortc);
  
          reconnectStartedAt = null;
          isConnected = false;
          isConnecting = false;
          validatedArrived = false;
          retryingWithSsl = false;        
  
          clearValidatedTimeout(self);
  
          if (ortc.sockjs != null) {
              ortc.sockjs.close();
              ortc.sockjs = null;
          }
      }
docs: /*
  Disconnects the socket.