Commits

Denis Bilenko committed 383415a

always sets WSGIHandler's close_connection to True in case of WebSocket

  • Participants
  • Parent commits 34b6d01
  • Branches stable

Comments (0)

Files changed (1)

File geventwebsocket/handler.py

     def _handle_websocket(self):
         environ = self.environ
         try:
-            try:
-                if environ.get("HTTP_SEC_WEBSOCKET_VERSION"):
-                    result = self._handle_hybi()
-                elif environ.get("HTTP_ORIGIN"):
-                    result = self._handle_hixie()
-            except:
+            if environ.get("HTTP_SEC_WEBSOCKET_VERSION"):
                 self.close_connection = True
-                raise
+                result = self._handle_hybi()
+            elif environ.get("HTTP_ORIGIN"):
+                self.close_connection = True
+                result = self._handle_hixie()
             self.result = []
             if not result:
                 return