Skip to content
Browse files

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

Better connection check in RequestHandler
  • Loading branch information...
2 parents 3dcf497 + b6ea32d commit 7d4623bcca2e44f1bf9c34638a5d924e358eeb3a @bdarnell bdarnell committed May 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornado/web.py
View
2 tornado/web.py
@@ -123,7 +123,7 @@ def __init__(self, application, request, **kwargs):
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)

0 comments on commit 7d4623b

Please sign in to comment.
Something went wrong with that request. Please try again.