php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70393 event_set doesn't accept persistent socket resource
Submitted: 2015-08-30 19:55 UTC Modified: 2015-09-16 20:38 UTC
From: edefimov dot it at gmail dot com Assigned:
Status: Closed Package: libevent (PECL)
PHP Version: 5.6.12 OS: Ubuntu 14.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: edefimov dot it at gmail dot com
New email:
PHP Version: OS:

 

 [2015-08-30 19:55 UTC] edefimov dot it at gmail dot com
Description:
------------
In libevent extension version 0.1.0 it is impossible to use event_set with persistent socket resource. 

Test script:
---------------
<?php

$socket = pfsockopen('php.net', 80);
stream_set_blocking($socket, 0);

$base = event_base_new();

$event = event_new();
$result = event_set($event, $socket, EV_READ | EV_WRITE, function ($socket) {

});

var_dump($result);


Expected result:
----------------
bool(true)

Actual result:
--------------
PHP Warning:  event_set(): fd argument must be either valid PHP stream or valid PHP socket resource

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-16 20:38 UTC] edefimov dot it at gmail dot com
This issue also applies to event_buffer_new, event_buffer_fd_set functions and can be fixed with this pull request https://github.com/php/pecl-event-libevent/pull/1
 [2015-09-17 12:24 UTC] tony2001@php.net
Automatic comment on behalf of edefimov.it@gmail.com
Revision: http://git.php.net/?p=pecl/event/libevent.git;a=commit;h=b687a88720350b9b7f8b1ade2fb0aa07518a8e90
Log: fix #70393 lib event can process persistent streams
 [2015-09-17 12:24 UTC] tony2001@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC