Skip to content
Browse files

Stop the consumer when an error is received. Fixes #11.

  • Loading branch information...
1 parent f42d52a commit 57aef76887017b8e82a6229c52cfa7c8b215d74e Stuart Dallas committed May 16, 2012
Showing with 6 additions and 4 deletions.
  1. +4 −4 README.md
  2. +2 −0 datasift/__init__.py
View
8 README.md
@@ -66,11 +66,11 @@ more details.
Changelog
---------
-* v.0.3.0 Added SSL support (2012-05-16)
+* v.0.3.0 Added SSL support and fixed a reconnection bug (2012-05-16)
- This is enabled by default and can be disabled by passing false as the third
- parameter to the User constructor, or calling enableSSL(false) on the User
- object.
+ The SSL support is enabled by default and can be disabled by passing false as
+ the third parameter to the User constructor, or calling enableSSL(false) on
+ the User object.
* v.0.2.0 Fixed the handling of error messages in streams (2012-05-04)
View
2 datasift/__init__.py
@@ -599,6 +599,8 @@ def _on_data(self, json_data):
self._on_error('Unhandled data received: %s' % (json_data))
def _on_error(self, message):
+ # Stop the consumer if we get an error
+ self.stop()
self._event_handler.on_error(self, message)
def _on_warning(self, message):

0 comments on commit 57aef76

Please sign in to comment.
Something went wrong with that request. Please try again.