On Mar 4, 8:59 am, Steve <[email protected]> wrote:
> > It's dumb bug - thanks for catching it - I'll squash the problem in other
> > files.

I found both problems with the UDP and Selector code.  As mentioned
previously, all the components in UDP_ng (and UDP too I think) need
the following cleanup added to the end of their while main loops:

        self.send(removeWriter(self, ((self, "writeReady"),
self.sock)),
                  "_selectorSignal")
        self.send(removeReader(self, ((self, "readReady"),
self.sock)),
                  "_selectorSignal")
        yield 1
        self.sock.close()

But even with this, there is a bug in Selector.py.  The selectable is
not being properly unpacked from the message object in the while
(self.dataReady("notify")) loop.  The corrected lines are:

            if isinstance(message, removeReader):
                selectable = message.object[1]
                self.removeLinks(selectable, meta[READERS], readers)

            if isinstance(message, removeWriter):
                selectable = message.object[1]
                self.removeLinks(selectable, meta[WRITERS], writers)

            if isinstance(message, removeExceptional):
                selectable = message.object[1]
                self.removeLinks(selectable, meta[EXCEPTIONALS],
exceptionals)

With both of these changes, UDP connections stop crashing for me.

Cheers,
Steve

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"kamaelia" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/kamaelia?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to