Ben Bass added the comment: Main issue here (as I see it) is that StreamRequestHandler and DatagramRequestHandler should behave in the same way. This is not the case in Python 2.5.1 for the case where the handle method does not respond to the request socket (e.g. in my case it is forwarding data to a different socket).
While handler methods in StreamRequestHandler need not send any data back to the request socket, in DatagramRequestHandlers an attempt will be made to send data whether any is available or not. This causes a socket hang (for several minutes) on Windows with a '10040 Message too long' error. By only sending data back to the request if the handler has written to wfile, this is avoided, giving the twin fixes of avoiding a nasty socket error and providing compatibilty with StreamRequestHandler behaviour. Test has been updated to add tests of handlers which do not respond to the request; this causes a hang in Python2.5.1 stock (not sure how to avoid this and cleanly fail), test passes with changed SocketServer. p.s. this is my first patch submission to anything, so go easy :-) Added file: http://bugs.python.org/file9271/DatagramServer.diff _____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1767511> _____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com