tonysimpson / nanomsg-python

nanomsg wrapper for python with multiple backends (CPython and ctypes) should support 2/3 and Pypy
MIT License
382 stars 85 forks source link

NameError: name 'nn_shutdown' is not defined #42

Closed danielnelson closed 7 years ago

danielnelson commented 9 years ago

I get an error when calling shutdown on an endpoint:

$ cat tmp.py 
import nanomsg

socket = nanomsg.Socket(nanomsg.PAIR)
endpoint = socket.bind('inproc://foo')
endpoint.shutdown()
$ python tmp.py 
Traceback (most recent call last):
  File "tmp.py", line 5, in <module>
    endpoint.shutdown()
  File "/home/dbn/usr/lib/python3.4/site-packages/nanomsg/__init__.py", line 140, in shutdown
    _nn_check_positive_rtn(nn_shutdown(self._fdocket._s,
NameError: name 'nn_shutdown' is not defined
jb098 commented 7 years ago

I've submitted a pull request that should hopefully resolve this.

tonysimpson commented 7 years ago

This has been merged, thanks.