Home » Networking » Net_SmartIRC » Bug #10118
quit command doesn't disconnect the socket
Details
| Submitted | 2007-02-19 02:25 UTC |
|---|---|
| From | ian at mywits-end dot co dot uk |
| Assigned | amir |
| Status | Closed |
| Package | Net_SmartIRC |
| PHP Version | Irrelevant |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2007-02-19 02:25 UTC] ian at mywits-end dot co dot uk
Description:
------------
There is a bug in Net/SmartIRC/irccommands.php that results in the 'quit' command not disconnecting the socket when it is used. Infact after sending the quit message, it doesn't do anything else, leaving your script hanging until you otherwise terminate it.
I have created a patch which fixes this and may be applied with "patch -p0 < irccommands.php.patch". The raised priority ensures the quit message is sent before the socket is destroyed, at which point your script should terminate normally.
The patch assumes your php/pear dir is /usr/share/php, which should be correct for most people. You may need to adjust accordingly if this is not so by editing the patch.
Kind Regards,
Ian
Test script:
---------------
Download patch from:
http://www.mywits-end.co.uk/irccommands.php.patch
Expected result:
----------------
Before patch applied, 'quit' sends the quit message but leaves a script hanging.
After patch applied, 'quit' works as documented.
Actual result:
--------------
As expected :)