Skip to content

Fail self.connect() under django #11

@mamcx

Description

@mamcx

I use this lib to publish in real time some data inside a django (1.6) app. Running under the devserver, I get (several of these):

Exception in thread Thread-1256:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "/Users/mamcx/Proyectos/BestSeller/CloudApi/ENV/src/python-firebasin-master/firebasin/connection.py", line 40, in run
    self.connect()
  File "/Users/mamcx/Proyectos/BestSeller/CloudApi/ENV/src/python-firebasin-master/firebasin/connection.py", line 68, in connect
    self.data.connect()
  File "/Users/mamcx/Proyectos/BestSeller/CloudApi/ENV/lib/python2.7/site-packages/ws4py/client/__init__.py", line 209, in connect
    self.sock.connect(self.bind_addr)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 333, in connect
    self._real_connect(addr, False)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 320, in _real_connect
    socket.connect(self, addr)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno 8] nodename nor servname provided, or not known

I check the code on .connect, and see that before it it just sleep for a while, but NOT really check if the handshake succes:

  # Just hang out until the handshake gives us the actual websocket URL
        while not self.url:
            time.sleep(0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions