Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
315 stars 80 forks source link

null exception error handled. #50

Closed serayuzgur closed 4 years ago

serayuzgur commented 4 years ago

I don't know why (maybe related with timeout) but sometimes android throws a null exception. So I wrapped it with a more meaningful error

Rapsssito commented 4 years ago

@serayuzgur, thanks for the PR! However, I think it is more important to find the root cause of the issue than to wrap it with an error. When do you get this null exceptions?

Overtorment commented 4 years ago

I assume this crashes android app? in that case, I'd suggest to handle it first, and then look for a root cause.

Rapsssito commented 4 years ago

Closing PR due to lack of a consistent test plan. Feel free to open a new one with a test plan so I can test if the code works correctly and fixes an issue!