Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.14

Bug #20973 timehandlers not called when not connected
Submitted: 2015-10-27 01:26 UTC
From: glen Assigned: garrettw
Status: Closed Package: Net_SmartIRC (version 1.1.8)
PHP Version: 5.5.30 OS: PLD Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 35 - 23 = ?

 
 [2015-10-27 01:26 UTC] glen (Elan Ruusamäe)
Description: ------------ i'm using time handler to setup call for pcntl_signal_dispatch() to safely handle SIGINT and SIGTERM $irc->registerTimehandler(1000, $this, 'signalDispatch'); public function signalDispatch(Net_SmartIRC $irc) { $irc->log(SMARTIRC_DEBUG_ACTIONHANDLER, "signal dispatch", __FILE__, __LINE__); pcntl_signal_dispatch(); } however, when there's no connection to server, the signalDispatch is never called, and thus signal handlers have no chance to work so it loops with these messages, and kill -s TERM does not work: Oct 26 23:25:57 SmartIRC.php(1056) DEBUG_CONNECTION: connecting Oct 26 23:25:57 SmartIRC.php(1072) DEBUG_SOCKET: binding to 0:0 Oct 26 23:25:57 SmartIRC.php(1101) DEBUG_NOTICE: couldn't connect to "localhost:6667" reason: "Connection refused (111)" Oct 26 23:25:57 SmartIRC.php(1182) DEBUG_CONNECTION: delaying reconnect for 10000 ms Oct 26 23:26:07 SmartIRC.php(1188) DEBUG_CONNECTION: reconnecting... Oct 26 23:26:07 SmartIRC.php(1056) DEBUG_CONNECTION: connecting Oct 26 23:26:07 SmartIRC.php(1072) DEBUG_SOCKET: binding to 0:0 Oct 26 23:26:07 SmartIRC.php(1101) DEBUG_NOTICE: couldn't connect to "localhost:6667" reason: "Connection refused (111)" Oct 26 23:26:07 SmartIRC.php(1182) DEBUG_CONNECTION: delaying reconnect for 10000 ms Oct 26 23:26:17 SmartIRC.php(1188) DEBUG_CONNECTION: reconnecting... Oct 26 23:26:17 SmartIRC.php(1056) DEBUG_CONNECTION: connecting Oct 26 23:26:17 SmartIRC.php(1072) DEBUG_SOCKET: binding to 0:0 Oct 26 23:26:17 SmartIRC.php(1101) DEBUG_NOTICE: couldn't connect to "localhost:6667" reason: "Connection refused (111)" Oct 26 23:26:17 SmartIRC.php(1182) DEBUG_CONNECTION: delaying reconnect for 10000 ms

Comments

 [2015-11-10 23:21 UTC] garrettw (Garrett Whitehorn)
-Status: Open +Status: Closed -Assigned To: +Assigned To: garrettw
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.