noobIOSCoder / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

Use @ to suppress warning from socket_select #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In XMLStream.php the socket_select call blocks and if you're using XMPPHP from 
within a script 
where you loop forever and catch SIGINT/TERM to exit it produces the following 
warning:

Warning: stream_select(): unable to select [4]: Interrupted system call 
(max_fd=5)

--- lib/XMPPHP/XMLStream.php    (revision 46)
+++ lib/XMPPHP/XMLStream.php    (working copy)
@@ -368,7 +368,7 @@
                        $read = array($this->socket);
                        $write = null;
                        $except = null;
-                       $updated = stream_select($read, $write, $except, 1);
+                       $updated = @stream_select($read, $write, $except, 1);
                        if ($updated > 0) {
                                $buff = @fread($this->socket, 1024);
                                if(!$buff) { 

Original issue reported on code.google.com by evan.bor...@gmail.com on 11 Jul 2008 at 4:02

GoogleCodeExporter commented 9 years ago
Fixed in SVN and next release shortly.  Thanks.

Original comment by nathanfr...@gmail.com on 18 Jul 2008 at 5:50