We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
IOStream.read_until_close does not accept callbacks anymore. Can you please update the code?
The text was updated successfully, but these errors were encountered:
diff --git a/torstomp/__init__.py b/torstomp/__init__.py index 65551f6..5bc2ea8 100644 --- a/torstomp/__init__.py +++ b/torstomp/__init__.py @@ -59,22 +59,24 @@ class TorStomp(object): return self.stream.set_close_callback(self._on_disconnect_socket) - self.stream.read_until_close( - streaming_callback=self._on_data, - callback=self._on_data) - self.connected = True self._disconnecting = False self._reconnect_attempts = 0 self._protocol.reset() yield self._send_frame('CONNECT', self._connect_headers) - + self.logger.info('Stomp connect sent') for subscription in self._subscriptions.values(): yield self._send_subscribe_frame(subscription) - + self.logger.info('Stomp subscribe sent') if self._on_connect: self._on_connect() + #self.stream.read_until_close() + while not self.stream.closed(): + buf = yield self.stream.read_until(b'\x00\n', 10e6) + self._on_data(buf) + yield None + self.logger.info('done.') def subscribe(self, destination, ack='auto', extra_headers={}, callback=None): @@ -160,7 +162,6 @@ class TorStomp(object): def _on_data(self, data): if not data: return - self._protocol.add_data(data) frames = self._protocol.pop_frames()
Sorry, something went wrong.
No branches or pull requests
IOStream.read_until_close does not accept callbacks anymore. Can you please update the code?
The text was updated successfully, but these errors were encountered: