This fixes issue 4332 for Py3k.
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index cf68835..236fd9e 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -614,6 +614,6 @@
             fcntl.fcntl(fd, fcntl.F_SETFL, flags)
 
         def set_file(self, fd):
-            self._fileno = fd
             self.socket = file_wrapper(fd)
+            self._fileno = self.socket.fileno()
             self.add_channel()