Hello there. I'm currently using 1.3; haven't checked out the 2.x branch. This question probably works for both, however.
I'm interested in halting connection attempts if NWPathMonitor tells me that the device has lost connection to the internet. Intuition tells me we can call disconnect(code:callback:) on the socket if that happens, and connect() when the connection returns.
Given that the socket would almost certainly be in a retry loop by the time NWPathMonitor notifies us, do you foresee any issues with this plan? disconnect(code:callback:) seems straightforward enough, but I'm not keen to see any race conditions that might pop up.
Thanks for your work on this project, and for your advice!
Hello there. I'm currently using 1.3; haven't checked out the 2.x branch. This question probably works for both, however.
I'm interested in halting connection attempts if
NWPathMonitor
tells me that the device has lost connection to the internet. Intuition tells me we can calldisconnect(code:callback:)
on the socket if that happens, andconnect()
when the connection returns.Given that the socket would almost certainly be in a retry loop by the time
NWPathMonitor
notifies us, do you foresee any issues with this plan?disconnect(code:callback:)
seems straightforward enough, but I'm not keen to see any race conditions that might pop up.Thanks for your work on this project, and for your advice!