Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
Try to fix duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Nov 18, 2014
1 parent 21e5719 commit c59f050
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/EventListener/Stream/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ public function failure(XMLEvent $event)
* Authentication successful.
*
* @param XMLEvent $event
* @return void
*/
public function success(XMLEvent $event)
{
if (false === $event->isStartTag()) {
$this->getOptions()->setAuthenticated(true);
$this->blocking = false;
$connection = $this->getConnection();

$connection = $this->getConnection();
$connection->resetStreams();
$connection->connect();

$this->getOptions()->setAuthenticated(true);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/EventListener/Stream/StartTls.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ public function attachEvents()
* Send start tls command.
*
* @param XMLEvent $event XMLEvent object
* @return void
*/
public function starttlsEvent(XMLEvent $event)
{
if (false === $event->isStartTag()) {
$connection = $this->getConnection();
$this->blocking = true;

$connection = $this->getConnection();
$connection->setReady(false);
$connection->send('<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>');
}
Expand Down

0 comments on commit c59f050

Please sign in to comment.