Hi, after some testing I can say that "except GeneratorExit" solution works ... it's not perfect but it works :)
What is not perfect here is that the GeneratorExit exception will rise when there will be a try to send a message to the client, only at that time system will "see" that the connection was closed by client and will rise exception which will do the cleanup job. But until that moment there is the possibility that there will be accumulate an enormous list of broken connections ... if there will be no need to send message for an arbitrary time?! this behavior could be considered a resource leak. I think this can be solved using some kind of connection checker, maybe creating a new custom event to be sent to clients an check if they are online. Another difficulty is that I can't use TurboGears as standalone application serving on port 80 because there is already apache serving some other hosts. So I need to connect my TG application as: 1. wsgi application 2. run my TG application on some other port (even in local) and tell to apache to proxy request to it based on some hostname. the difficulty is that in first case, apache will not allow to maintain an active connection with the client and for the second solution apache will allow for client to open a SSE connection but will close it after some time. I know, for solving this I should do a better apache configuration. So if some one of you can give me some advices it will be great? ... although this is beyond the intention of this forum, it will help me to use my TG application in the correct way :) Thank you for your patience. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/turbogears. For more options, visit https://groups.google.com/d/optout.

