bergie / dnode-php

DNode RPC protocol implementation for PHP
MIT License
430 stars 86 forks source link

Getting an Operation timed out #16

Closed chrismark closed 12 years ago

chrismark commented 12 years ago

Hi,

I'm using php 5.3 and dnode-php 0.0.2 from https://packagist.org/packages/dnode/dnode.

Tested running examples/simple/server.php and after a while it stops and display this:

PHP Warning: stream_socket_accept(): accept failed: Operation timed out in in /path/packages/vendor/dnode/dnode/src/DNode/DNode.php on line 55

In that line is

while ($stream = stream_socket_accept($server)) {
       $this->handleConnection($stream, $params);
}

I looked into http://php.net/manual/en/function.stream-socket-accept.php and it accepts timeout as second arg and it uses as default what's in ini_get("default_socket_timeout") which is 60 in mine so it stops after 60 seconds. Setting it to -1 seems to work and it waits forever.

igorw commented 12 years ago

If you use dev-master you should not have that problem anymore.

igorw commented 12 years ago

@bergie can you maybe tag another release?

bergie commented 12 years ago

@igorw done: https://github.com/bergie/dnode-php/tags

igorw commented 12 years ago

Thanks, however that's still missing the two PRs you merged via web. Sorry for nagging :)

bergie commented 12 years ago

@igorw oops, fixed. There is a 0.1.1 now.

igorw commented 12 years ago

Thanks Henri!