Problem
Once in a while, for some reason, MacOS disconnects then reconnects the network which triggers notifications about network connection.
Solution
Consider sending the notification after a delay of some seconds after which you check is the connection actually changed
Problem
Once in a while, for some reason, MacOS disconnects then reconnects the network which triggers notifications about network connection.
Solution
Consider sending the notification after a delay of some seconds after which you check is the connection actually changed