SwiftPing icon indicating copy to clipboard operation
SwiftPing copied to clipboard

crash after multiple pings

Open hanssl opened this issue 8 years ago • 2 comments

The swift port of this pod crashes after multiple pings. However, I don't think the crash is related to the port. I think that the socket file descriptors are not being returned after use.

https://github.com/OliverLetterer/SPLPing/issues/2

hanssl avatar Sep 19 '16 18:09 hanssl

@hanssl I am using this library with 255 pings at 4th octect of local network, and I have never faced crash in this library. Could you please provide the details of pinged ips format.

ankitthakur avatar Oct 14 '16 08:10 ankitthakur

@hanssl, I am seeing that you are using for loop, instead can you try to use enumeration like

[arrayOfIPs enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
                    [self startPinging:arrayOfIPs[idx]];
                }];
- (void) startPinging:(NSString*)ipAddress{
// ping ip here.
}

ankitthakur avatar Jan 03 '17 08:01 ankitthakur