Merge pull request #514 from ahassany/fix-connectin-check

Better connection check in RequestHandler
This commit is contained in:
bdarnell 2012-05-26 11:22:52 -07:00
commit 7d4623bcca
1 changed files with 1 additions and 1 deletions

View File

@ -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)