naptics / PlainPing

a very plain ping interface in swift
MIT License
60 stars 21 forks source link

Ping doesn't work when call in global thread #22

Open OrWest opened 6 years ago

OrWest commented 6 years ago

I call ping in global thread:

DispatchQueue.global().async { PlainPing.ping("www.google.com") { (elapsed, error) in print(123) } }

and block isn't called.

I placed breakpoint on callback in SimplePing.m and found that resolving callback was't called. When call ping in main thread it was called.

So, I think it should be commented in ping method comment.