Added hook on_disconnect.

This commit is contained in:
Elijah Perrault committed 2011-03-02 22:02:24 -07:00
1 parent 12356984fc
commit 62551dc6c9
3 files changed
+19

No files matched your search

+1
View File
@@ -471,6 +471,7 @@ while (1) {
err(2, "Lost connection to $sockid!", 0);
$SELECT->remove($sock);
delete $SOCKET{$sockid};
API::Std::event_run('on_disconnect', $sockid);
if (!keys %SOCKET) {
# No more connections, stop the program.
API::Std::event_run('on_shutdown');