title: gunicorn and websockets
body: <p>I'm trying to get <a href="http://www.gelens.org/code/gevent-websocket/" rel="nofollow">http://www.gelens.org/code/gevent-websocket/</a> running and keep getting the following error.</p>
  
  <pre><code>socket_id=1 already closed.
      result = self._run(*self.args, **self.kwargs)
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 571, in handle
      handler.handle()
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 180, in handle
      result = self.handle_one_request()
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 314, in handle_one_request
      self.handle_one_response()
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/geventwebsocket/handler.py", line 26, in handle_one_response
      return self._handle_websocket()
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/geventwebsocket/handler.py", line 50, in _handle_websocket
      self.log_request()
    File "/home/walt/virtualenv/ws/local/lib/python2.7/site-packages/gevent/pywsgi.py", line 394, in log_request
      log.write(self.format_request() + '\n')
  AttributeError: 'Logger' object has no attribute 'write'
  </code></pre>
  
  <p>I'm running python 2.7.2 on Mint Linux</p>