Skip to content

Commit

Permalink
don't require OK as auth response
Browse files Browse the repository at this point in the history
  • Loading branch information
jehiah committed Jun 3, 2014
1 parent d1bdc75 commit a197264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions nsq/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,7 @@ def _on_response_continue(self, data, **kwargs):
def _on_auth_response(self, data, **kwargs):
self.off('response', self._on_auth_response)
self.trigger('auth_response', conn=self, data=data)
if data == 'OK':
return self.trigger('ready', conn=self)
else:
self.trigger('error', conn=self, error=nsq.Error('AUTH Failure %r' % data))
return self.trigger('ready', conn=self)

def _on_data(self, data, **kwargs):
self.last_recv_timestamp = time.time()
Expand Down
2 changes: 1 addition & 1 deletion nsq/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _on_connection_auth(self, conn, data, **kwargs):
logging.info('[%s:%s] AUTH sent' % (conn.id, self.name))

def _on_connection_auth_response(self, conn, data, **kwargs):
logging.info('[%s:%s] AUTH received %r' % (conn.id, self.name, data))
logging.info('[%s:%s] AUTH response %r' % (conn.id, self.name, data))

def _on_connection_error(self, conn, error, **kwargs):
if kwargs:
Expand Down

0 comments on commit a197264

Please sign in to comment.