Ejemplo n.º 1
0
 /**
  * Graceful disconnect from the server
  *
  */
 public function disconnect()
 {
     try {
         if ($this->connection && $this->connection->isConnected()) {
             if ($this->protocol) {
                 $this->sendFrame($this->protocol->getDisconnectFrame(), false);
             }
             $this->connection->disconnect();
         }
     } catch (StompException $ex) {
         // nothing!
     }
     $this->sessionId = null;
     $this->subscriptions = array();
     $this->unprocessedFrames = array();
     $this->protocol = null;
 }