Merge pull request #514 from ahassany/fix-connectin-check
Better connection check in RequestHandler
This commit is contained in:
commit
7d4623bcca
|
@ -123,7 +123,7 @@ class RequestHandler(object):
|
|||
self.ui["modules"] = self.ui["_modules"]
|
||||
self.clear()
|
||||
# Check since connection is not available in WSGI
|
||||
if hasattr(self.request, "connection"):
|
||||
if getattr(self.request, "connection", None):
|
||||
self.request.connection.stream.set_close_callback(
|
||||
self.on_connection_close)
|
||||
self.initialize(**kwargs)
|
||||
|
|
Loading…
Reference in New Issue