anonircd

"anonymous" fork of miniircd
git clone https://0x1A4.1337.cx/code2/anonircd.git
Log | Files | Refs

commit 57f15c089067fddd3d1a712c23f46fd31bba0276
parent 5f64e56973deddd5f80ae0bf78cec2932fbb7b9a
Author: Joel Rosdahl <joel@rosdahl.net>
Date:   Sun Jul  1 18:23:12 +0200

Fix crash when the write queue for a disconnected client is non-empty

Reported by Jim Leonard.

Diffstat:
CHANGES | 1+
miniircd | 5+++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CHANGES b/CHANGES @@ -4,6 +4,7 @@ UNRELEASED * 422 message is now sent after registration when no MOTD is available. * Added support for WALLOPS command. * Added option to store persistent state (currently channel topic and key). + * Fixed crash when the write queue for a disconnected client is non-empty. 0.3 2011-08-25 diff --git a/miniircd b/miniircd @@ -1,7 +1,7 @@ #! /usr/bin/env python # Hey, Emacs! This is -*-python-*-. # -# Copyright (C) 2003, 2011 Joel Rosdahl +# Copyright (C) 2003, 2011-2012 Joel Rosdahl # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -753,7 +753,8 @@ class Server(object): self.print_info("Accepted connection from %s:%s." % ( addr[0], addr[1])) for x in owtd: - self.clients[x].socket_writable_notification() + if x in self.clients: # client may have been disconnected + self.clients[x].socket_writable_notification() now = time.time() if last_aliveness_check + 10 < now: for client in self.clients.values():