Permalink
Browse files

fix __main__ section in geventserver

  • Loading branch information...
1 parent cd49f80 commit de1d88e4bfb34dc579841e510e4e5ee14d25eb40 @denik committed Oct 8, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 ws4py/server/geventserver.py
@@ -47,7 +47,12 @@ def __init__(self, *args, **kwargs):
extensions=extensions)
if __name__ == '__main__':
- def echo_handler(environ, websocket):
+
+ def echo_handler(environ, start_response):
+ if start_response is not None:
+ start_response('400 Bad Request', [])
+ return []
+ websocket = environ['wsgi.websocket']
try:
while True:
msg = websocket.receive(msg_obj=True)

0 comments on commit de1d88e

Please sign in to comment.