php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68322 GearmanWorker::addServer involves socket I/O, different than documentation
Submitted: 2014-10-29 10:01 UTC Modified: 2017-01-10 08:24 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: minhao dot zhang at qq dot com Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.5.18 OS: Mac OSX 10.9
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-10-29 10:01 UTC] minhao dot zhang at qq dot com
Description:
------------
---
From manual page: http://www.php.net/gearmanworker.addserver
---

GearmanWorker::addServer will establish a TCP connection with gearmand server. This is not the same behaviour as documentation says.

run test script and try the following from your gearmand server:

lsof -i tcp | grep gearman

you can notice that a TCP connection is already established even if we do not call $gearman_worker->work() 

Test script:
---------------
<?php
$gearman_worker = new GearmanWorker();
$gearman_worker->addServer('localhost', 4730);
sleep(100);


Expected result:
----------------
no connection is established when addServer is called alone

Actual result:
--------------
a TCP connection is observed when addServer is called alone

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 08:24 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:24 UTC] kalle@php.net
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 22:01:27 2024 UTC