We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8efea28 commit 18e2adaCopy full SHA for 18e2ada
1 file changed
moleculer/client.py
@@ -298,7 +298,6 @@ def run(self):
298
self.stop()
299
if (self._connection is not None and
300
not self._connection.is_closed):
301
- # Finish closing
302
self._connection.ioloop.start()
303
304
LOGGER.info('Stopped')
@@ -313,6 +312,12 @@ def stop(self):
313
312
314
"""
315
LOGGER.info('Stopping')
+ disconnect_packet = {
316
+ 'ver': '2',
317
+ 'sender': self.NODE_ID
318
+ }
319
+ self._channel.basic_publish(MOLECULER_EXCHANGES['DISCONNECT'], '',
320
+ json.dumps(disconnect_packet))
321
self._stopping = True
322
self.close_channel()
323
self.close_connection()
0 commit comments