mod wsgi - Detect prematurely closed connection in web.py -


What is a way for the user to close and identify the connection during the processing process?

I tried to set up a flip handler, but in this case it was not found. The request is only done successfully after completion:

  class handler: def __init __ (self): pass def (self): try: while: (true): except for exception Pass, e: logger .debug (e) def unload (): try logger.debug ('unloaded'): app = web.application (urls, globals ()) app.add_processor (web.unloadhook (unload)) Application = app.wsgifunc () Except the exception, E: Logger. Debug (E)  

I open the app in a browser and when it starts spinning in the loop, I break the request, but no exception is thrown. Generally there is no reliable way to do this because of the web server and WSGI's own working method.

Read for an explanation:


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -