Commits

Jeffrey Gelens committed fedec45

Fix to maintain backwards compatibility

Comments (0)

Files changed (1)

geventwebsocket/websocket.py

 
     @property
     def current_app(self):
-        return self.handler.server.application.current_app
+        if hasattr(self.handler.server.application, 'current_app'):
+            return self.handler.server.application.current_app
+        else:
+            class MockApp():
+                def on_close(self, *args):
+                    pass
+
+            return MockApp()
 
     @property
     def origin(self):