Skip to content
New issue

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

wouldn't removeAllListeners break all callbacks? #876

Closed
bmrpatel opened this issue Aug 13, 2020 · 3 comments
Closed

wouldn't removeAllListeners break all callbacks? #876

bmrpatel opened this issue Aug 13, 2020 · 3 comments
Assignees
Labels
bug IoTSDK tracks all IoT SDK issues across the board

Comments

@bmrpatel
Copy link

bmrpatel commented Aug 13, 2020

In the following sample is calling removeAllListeners and then it is not added back wouldn't this break all the call backs for connect() called on the following line.

client.removeAllListeners();

When I am testing this sample code, I am also seeing that once disconnect is called device not accepting any DM calls or C2D messages? It becomes unresponsive and I have to restart the process. Sometimes it goes into the infinite loop of disconnect and connect. How do I avoid this issue? Do you have any sample which handles the disconnect with DM calls setup? How do I rewire all the DM calls so that after reconnect it is responsive.

Testing Disconnect
I am causing disconnect by attaching the debugger, add break point in one of the DM and wait there for more than 4 minutes to cause timeout on connection. After this device gets into unresponsive mode event after it reconnects.

AB#7982563

@github-actions github-actions bot added the IoTSDK tracks all IoT SDK issues across the board label Aug 13, 2020
@YoDaMa
Copy link
Contributor

YoDaMa commented Aug 13, 2020

that does look like a bug. Thanks for pointing it out. We'll fix this in the sample code.

@YoDaMa
Copy link
Contributor

YoDaMa commented Aug 18, 2020

#877 addresses this.

@YoDaMa YoDaMa closed this as completed Aug 18, 2020
@az-iot-builder-01
Copy link
Collaborator

@bmrpatel, @YoDaMa, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug IoTSDK tracks all IoT SDK issues across the board
Projects
None yet
Development

No branches or pull requests

4 participants