Commits

Jeffrey Gelens  committed 8e4565b

Fix didn't work for derived classes, just set clients if not present.

  • Participants
  • Parent commits ee2665b

Comments (0)

Files changed (1)

File geventwebsocket/handler.py

         """
         Called when a websocket has been created successfully.
         """
+
         if getattr(self, 'prevent_wsgi_call', False):
             return
 
+        # In case WebSocketServer is not used
+        if not hasattr(self.server, 'clients'):
+            self.server.clients = {}
+
         # Since we're now a websocket connection, we don't care what the
         # application actually responds with for the http response
 
-        if type(self.server).__name__ != 'WebSocketServer':
-            self.server.clients = {}
-            warnings.warn('Usage of WSGIServer is deprecated, please use '
-                          'WebSocketServer')
-
         try:
             self.server.clients[self.client_address] = Client(
                 self.client_address, self.websocket)