zuvola / flutter_icmp_ping

Flutter plugin that sends ICMP ECHO_REQUEST
MIT License
3 stars 9 forks source link

methodCh.invokeMethod moved below to eventCh broadcast stream #9

Closed devibrahimkarahan closed 2 years ago

devibrahimkarahan commented 2 years ago

Bug description: In first opening the app, there is no event coming from event channel. But it must come, I moved methodChannel start invoke method line to below eventChannel broadcast stream and now the event coming.

How to reproduce: 1- Turn off wifi and cellular. 2- And try to ping any url. 3- Now start the app, you will not receive any event from Ping(...).stream.listen; 4- Hot restart the app, now your code will work and you will get event unknownHost

iPhone 7 Plus, iOS 15.5, Flutter 3.0.2 Stable

zuvola commented 2 years ago

Unfortunately, I am unable to reproduce this issue, but since it means that your problem has been resolved, I have merged it. Thank you for the PR.