diff options
author | Evan Prodromou <evan@boursin.controlezvous.ca> | 2008-07-05 16:24:12 -0400 |
---|---|---|
committer | Evan Prodromou <evan@boursin.controlezvous.ca> | 2008-07-05 16:24:12 -0400 |
commit | 62db03d31fc1341fb3eb83e1aed9b1972f1252b0 (patch) | |
tree | 37d4f4a4087f4cdb2237602c33c533d3230c44f1 | |
parent | 93fc218f7943b8ec00693389980417b18a875396 (diff) |
fixup disconnected to use method
darcs-hash:20080705202412-5a68a-12ead3349425d70ec0a8349ebc3ce24b7a628dbc.gz
-rwxr-xr-x | xmppdaemon.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmppdaemon.php b/xmppdaemon.php index 2fcd46eb8..da5ffb9f4 100755 --- a/xmppdaemon.php +++ b/xmppdaemon.php @@ -54,6 +54,7 @@ class XMPPDaemon { } function connect() { + $connect_to = ($this->host) ? $this->host : $this->server; $this->log(LOG_INFO, "Connecting to $connect_to on port $this->port"); @@ -63,6 +64,7 @@ class XMPPDaemon { if (!$this->conn) { return false; } + return !$this->conn->isDisconnected(); } @@ -71,7 +73,7 @@ class XMPPDaemon { static $parts = array('message', 'presence', 'end_stream', 'session_start'); - while(!$this->conn->disconnected) { + while(!$this->conn->isDisconnected()) { $payloads = $this->conn->processUntil($parts, 10); |