[Zope-dev] Medusa Status Handler

Christian Theune ct@gocept.com
Tue, 21 Aug 2001 12:06:54 +0200


--aVD9QWMuhilNxW9f
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

hi there.

i am using the medusa status handler sometimes, and found a bug in the=20
close_zombies part.

somebody forgot that he uses socket_map.keys() and tried to .close()
on the key, which raised - naturally - an error.

status_handler:120: (fixed)

for channel_key in asyncore.socket_map.keys():
    channel=3Dasyncore.socket_map[channel_key]
    if channel.__class__ =3D=3D http_server.http_channel:
        if channel !=3D request.channel:
            if (now - channel.creation_time) > channel.zombie_timeout:
                channel.close()
request.done()               =20


--=20
Christian Theune - ct@gocept.com
gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt
tel.+49 3496 3099112 - fax.+49 3496 3099118 mob. - 0178 48 33 981

reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])

--aVD9QWMuhilNxW9f
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org

iD8DBQE7gjK+dUt9X/gknwIRAmasAJ9KFbCyuPtk7kKcGE64Fycbqblv2wCgs76f
MKNH7qGbgNy5DqBF+mVbB+8=
=EOWq
-----END PGP SIGNATURE-----

--aVD9QWMuhilNxW9f--