Commits

Jeffrey Gelens committed ee2665b

Fix of #35, but throw a deprecation of warning for now.

Comments (0)

Files changed (1)

geventwebsocket/handler.py

 import base64
 import hashlib
+import warnings
 
 from gevent.pywsgi import WSGIHandler
 from .websocket import WebSocket, Stream
 
         # 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)