-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
diff --git a/amqp.inc b/amqp.inc
the actual code only checks for false as the return value of fwrite in AMQPConnection::write($data). sometimes, fwrite() does not return false but 0 bytes, and the while(true) makes php hang forever. this is the main concern here. the main loop and that fwrite is not returning false when an errno=32 happens. my solution (others may exist.. ):
index 1bf03b3..3607afe 100644
--- a/amqp.inc
+++ b/amqp.inc
@@ -436,7 +436,7 @@ class AMQPConnection extends AbstractChannel
$len = strlen($data);
while(true)
{
-
if(false === ($written = fwrite($this->sock, $data))) -
if(false === ($written = fwrite($this->sock, $data)) || $written === 0) { throw new Exception ("Error sending data"); }
thanks!
Metadata
Metadata
Assignees
Labels
No labels