question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disconnected event not raised after stopping and restarting ManagedClient

See original GitHub issue

Hi, I am currently trying to implement my own protocol fallback strategy where the websocket connection is used if the connection fails over mqtt. To do so, I start the client with the first protocol and if the ConnectionFailed event is raised, I stop the client and restart with new options. (In between the stop and start, I have had to put a delay because once StopAsync is called, the client is not yet stopped and it can’t be started again.)

However, once the client has been stopped and restarted, a loss of connection will not raise the disconnected event. The logs show the Ping TX >>> then Stopped receiving packets and that is all. I have tried the same thing on the first protocol (so no stopping of the client) and the event is raised. I have also tried raising the delay after calling StopAsync up to 5 seconds and the same happens.

This bug is happening on both MQTT and WSS connections and I have tried with v1.8.4 and v1.8.5

Steps to reproduce:

  • StartAsync with MQTT options
  • On connection fail, StopAsync and wait ~50ms
  • StartAsync with WSS options
  • Unplug Internet cable and wait for next ping request
  • The disconnected event is not fired

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chkr1011commented, Nov 25, 2020

I assume this is no longer relevant since there is no reply.

0reactions
SeppPennercommented, Jun 28, 2019

Does this apply to the latest version, too?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disconnected event not raised after stopping and restarting ...
Hi, I am currently trying to implement my own protocol fallback strategy where the websocket connection is used if the connection fails over ......
Read more >
Disconnecting a session-managed client - Progress Documentation
The following example shows how a session-managed client can disconnect from a PAS for OpenEdge instance: DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
Read more >
Huge problems with 'Managed Client' - Apple Community
i recently ran into huge problems with a process called 'managed client'. Every time, when i put my MBP to sleep, the CPU...
Read more >
Should I always disconnect event handlers in the Dispose ...
To prevent your event handler from being invoked when the event is raised, unsubscribe from the event. In order to prevent resource leaks,...
Read more >
Administrator Guide
from the computers to be managed. 4 Stop and restart the NetIQ AppManager Management Service. (NetIQms) to register the new key with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found