[Zope-dev] kill Zserver zombie channels

Júlio Dinis Silva juliodinis@hotmail.com
Tue, 20 Feb 2001 21:08:51 -0000


Hi,

blatantly taken from ZServer/HTTPServer.py and adultered is this code to 
kill zhttp channels used in zope by way of an external method:

def killzombies():
        import ZServer
        from ZServer import HTTPServer
        from ZServer import medusa
        from ZServer.medusa import asyncore
        from ZServer.medusa import http_server

        for channel in asyncore.socket_map.values():
                if channel.__class__ == HTTPServer.zhttp_channel:
                        channel.close()

        return 1

I ignore here the zombie_timeout, Im just killing all channels.
The problem is that I also kill the main python process.
I would apreciate if any zserver/medusa guru can iluminate my mind
on what I'm doing wrong here. In this code I only close
zhttp_channels and not zhttp_server ones, so I dont understand why the
server is also closed.

Thanx for comments,
Júlio Dinis Silva
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.