Changeset 98

Show
Ignore:
Timestamp:
03/01/08 22:04:37 (5 years ago)
Author:
Seldaek
Message:

* Fixes some keepalive bugs
+ Adds the Reconnect module

Location:
trunk/Phergie
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/Phergie/Driver/Streams.php

    r96 r98  
    130130        ); 
    131131 
    132         if ($this->getIni('timeout') !== null) { 
     132        if ($this->getIni('timeout')) { 
    133133                stream_set_timeout($this->socket, $this->getIni('timeout') * 60); 
    134134        } elseif ($this->getIni('keepalive')) { 
     
    325325    public function doQuit($reason = null, $reconnect = false) 
    326326    { 
    327         $this->send(Phergie_Event_Request::TYPE_QUIT, array($reason, $reconnect)); 
     327        if ($this->queueing) { 
     328                $this->send(Phergie_Event_Request::TYPE_QUIT, array($reason, $reconnect)); 
     329        } else { 
     330                $this->send(Phergie_Event_Request::TYPE_QUIT, array($reason)); 
     331        } 
    328332    } 
    329333 
  • trunk/Phergie/phergie.ini

    r97 r98  
    3333;    gets disconnected from the server, defaults to false. 
    3434;    if this is set to true, you should set timeout value to 6 or above. 
    35 keepalive = true  
     35keepalive = true 
    3636 
    3737; timeout : 
     
    4141;    0 means it will never time out, but if you use keepalive you should set 
    4242;    this to 6 or above. 
    43 timeout = 6 
     43timeout = 8 
    4444 
    4545; gender : 
     
    172172 
    173173;----------------------------------------------------------------------------- 
    174 ; Quit  
     174; Quit 
    175175;----------------------------------------------------------------------------- 
    176176 
    177177; quit.reason : 
    178178;    custom reason message to use when quitting 
    179 quit.reason =  
     179quit.reason = 
    180180 
    181181;-----------------------------------------------------------------------------