naptics / PlainPing

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

Crash prevention from assert( CFSocketGetSocketFlags(self.socket) & kCFSocketCloseOnInvalidate ); #29

Closed nneuberger1 closed 3 years ago

nneuberger1 commented 4 years ago

We swapped out the assert because we're getting crashes on the following line:

assert( CFSocketGetSocketFlags(self.socket) & kCFSocketCloseOnInvalidate );

Instead we're using if / else if statements and if found present, then we return an error and let the caller get an error back from a ping response on the Swift side.

nneuberger1 commented 3 years ago

We've been running my master branch for almost a year now. Any chance we can merge this into your repo? We're very stable with change I have on master.

seeppp commented 3 years ago

Thanks for testing your changes for almost a year 😉

I'll merge it! But keep in mind, we don't do any maintenance on this repository anymore. (I probably have to update the Readme...)

nneuberger1 commented 3 years ago

No problem @seeppp. We've been using my fork the entire time. We use it for credit card VeriFone e355 swipers. at some point, we're going to migrate to other vendors that have built in rest interfaces.

nneuberger1 commented 3 years ago

If I get really bored, I'll submit a pull request to create an SPM file for later usage instead of using CocoaPods.