xuuhaoo / OkSocket

An blocking socket client for Android applications.
MIT License
2.58k stars 433 forks source link

偶现闪退 #169

Open Aracoix opened 4 years ago

Aracoix commented 4 years ago

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.net.Socket.isClosed()' on a null object reference at com.xuhao.didi.socket.client.impl.client.ConnectionManagerImpl.isConnect(ConnectionManagerImpl.java:2) at com.xuhao.didi.socket.client.impl.client.ConnectionManagerImpl.connect(ConnectionManagerImpl.java:5) at com.ihomefnt.imcore.IMConnect.connectService(IMConnect.java:13) at com.ihomefnt.imcore.IMSocketActionAdapter$3.run(IMSocketActionAdapter.java:1) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6524) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

ghost commented 4 years ago

其实是必现, 作者都懒得修, 建议换库

wylIwwg commented 4 years ago

我去 我自己写的socket库也会偶尔出现这个问题,没想到这个库也会