[PEAR-BUG] Bug #14924 [Opn->Ver]: delayed timer with real socket

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at https://pear.php.net/bugs/bug.php?id=14924&edit=1

 ID:               14924
 Updated by:       [email protected]
 Reported By:      cortexd at wanadoo dot fr
 Summary:          delayed timer with real socket
-Status:           Open
+Status:           Verified
 Type:             Bug
 Package:          Net_SmartIRC
 Operating System: Windows XP SP3
 Package Version:  1.0.0
 PHP Version:      5.2.6
 Roadmap Versions: 
 New Comment:

-Status: Open
+Status: Verified



Previous Comments:
------------------------------------------------------------------------

[2008-10-30 11:29:14] cortexd

Description:
------------
with real socket, the timer handler is delayed if someone talks on the
channel between two triggers

Test script:
---------------
<?php
require_once 'Net/SmartIRC.php';

class Bot
{
    public function test(Net_SmartIRC $irc)
    {
        $irc->message(SMARTIRC_TYPE_CHANNEL, '#cortexd', 'every 10
seconds');
    }
}

$bot = new Bot();
$irc = new Net_SmartIRC();
$irc->setUseSockets(true);

$irc->registerTimehandler(10000, $bot, 'test');

$irc->connect('irc.quakenet.org', 6667);
$irc->login('SmartIRC', 'Net_SmartIRC', 8, 'smartirc');
$irc->join('#cortexd');
$irc->listen();

Expected result:
----------------
with "$irc->setUseSockets(false);" the result is :

[17:08:49] <SmartIRC> every 10 seconds
[17:08:59] <SmartIRC> every 10 seconds
[17:09:09] <SmartIRC> every 10 seconds
[17:09:19] <SmartIRC> every 10 seconds
[17:09:29] <SmartIRC> every 10 seconds
[17:09:39] <SmartIRC> every 10 seconds
[17:09:42] <Cortexd> lol
[17:09:44] <Cortexd> lol
[17:09:45] <Cortexd> lol
[17:09:49] <SmartIRC> every 10 seconds

Actual result:
--------------
with "$irc->setUseSockets(true);" the result is :

[17:11:11] <SmartIRC> every 10 seconds
[17:11:21] <SmartIRC> every 10 seconds
[17:11:31] <SmartIRC> every 10 seconds
[17:11:42] <SmartIRC> every 10 seconds
[17:11:52] <SmartIRC> every 10 seconds
[17:12:02] <SmartIRC> every 10 seconds
[17:12:13] <SmartIRC> every 10 seconds
[17:12:23] <SmartIRC> every 10 seconds
[17:12:26] <Cortexd> lol
[17:12:28] <Cortexd> lol
[17:12:29] <Cortexd> lol
[17:12:40] <SmartIRC> every 10 seconds
[17:12:50] <SmartIRC> every 10 seconds

when somebody talks, the timer is delayed !

------------------------------------------------------------------------


-- 
Edit this bug report at https://pear.php.net/bugs/bug.php?id=14924&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.