Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snappy socket undeclared variable #129

Merged
merged 1 commit into from
Sep 2, 2015

Conversation

mreiferson
Copy link
Member

I'm not sure how to reproduce this issue. I am using snappy for writing to nsqd but not when reading, maybe that is what's causing this issue.

WARNING:tornado.general:error on read
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 644, in _handle_read
pos = self._read_to_buffer_loop()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 614, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 726, in _read_to_buffer
chunk = self.read_from_fd()
File "/usr/local/lib/python2.7/dist-packages/tornado/iostream.py", line 1005, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
File "/usr/local/lib/python2.7/dist-packages/nsq/snappy_socket.py", line 23, in recv
return self._recv(size, self._socket.recv)
File "/usr/local/lib/python2.7/dist-packages/nsq/snappy_socket.py", line 36, in _recv
if not uncompressed:
UnboundLocalError: local variable 'uncompressed' referenced before assignment

@mreiferson
Copy link
Member

looks like an actual bug, but it's an easy fix

@mreiferson mreiferson added the bug label Jul 31, 2015
@mreiferson
Copy link
Member

RFR @jehiah

jehiah added a commit that referenced this pull request Sep 2, 2015
@jehiah jehiah merged commit 729dbfd into nsqio:master Sep 2, 2015
@mreiferson mreiferson deleted the snappy_socket_bug_129 branch September 2, 2015 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants