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

Not all network interruptions are resulting in prompt close listener calls or isActive state update #145

Open
leisurehound opened this issue Nov 5, 2023 · 1 comment

Comments

@leisurehound
Copy link

Describe the bug
Per the discussion, it appears that not all means of network interruption are resulting in a timely call to the close listener (and thus the isActive state update).

To Reproduce
Create a MQTTNIO.Client and successfully connect (I'm using HiveMQ in this instance)
Once successfully connected, leave WIFI on but disconnect from the current wifi access point (and have no other wired network connections)
The Xcode console will immediately report nw_proto_tcp_route_init [C1.1.1:2] no mtu received but it will take 45-90s for the close listener to be called.

Expected behavior
The close listener to be called as soon as NIO determines there is no longer a route.

Context (please complete the following information):

  • Platform [e.g. iOS, macOS, Linux] macOS Ventura
  • Swift/Xcode Version: 15.0.1
  • Version 2.10.0

Additional context
I am also trying to run this on Raspbian Bookworm with swift 5.9.1 however I'm yet to determine a way to kill the Pi's wifi connectivity while retaining a session shell over ethernet to observe the behavior.

@adam-fowler
Copy link
Collaborator

I've had a closer look at this and the channel is not closed because it can be resurrected if the wifi connection is re-established.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants