]> granicus.if.org Git - python/commitdiff
SF bug #892492: Multiple close() for asyncore.dispatcher.
authorRaymond Hettinger <python@rcn.com>
Sun, 8 Feb 2004 11:32:50 +0000 (11:32 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 8 Feb 2004 11:32:50 +0000 (11:32 +0000)
(Contributed by Alexey Klimkin.)

Don't keep the file descriptor after the channel is deleted.

Lib/asyncore.py

index fa70e19a05d8d007b494647922de4ab9d096c87d..c886f9288bcf654ee70d962c8563110022898a87 100644 (file)
@@ -222,6 +222,7 @@ class dispatcher:
         if map.has_key(fd):
             #self.log_info('closing channel %d:%s' % (fd, self))
             del map[fd]
+        self._fileno = None
 
     def create_socket(self, family, type):
         self.family_and_type = family, type