导致ANR
gydhy8 opened this issue · 1 comments
主线程调用disconnect或者connect后有一定几率出现ANR问题,好像死锁了:
部分bugly日志如下:
com.xuhao.didi.socket.client.impl.client.ConnectionManagerImpl.disconnect(ConnectionManagerImpl.java:1)
com.xuhao.didi.socket.client.impl.client.ConnectionManagerImpl.disconnect(ConnectionManagerImpl.java:20)
一样,遇到相同的问题,网络状态不好连接失败时自动调用disconnect
ANR Input dispatching timed out (Waiting to send key event because the focused window has not finished processing all of the input events that were previously delivered to it. Outbound queue length: 0. Wait queue length: 1.)
com.xuhao.didi.socket.client.impl.client.ConnectionManagerImpl.disconnect(ConnectionManagerImpl.java:232)
com.xuhao.didi.socket.client.impl.client.action.ActionHandler.onSocketConnectionFailed(ActionHandler.java:60)
com.xuhao.didi.socket.client.impl.client.action.ActionDispatcher.dispatchActionToListener(ActionDispatcher.java:111)
com.xuhao.didi.socket.client.impl.client.action.ActionDispatcher.access$200(ActionDispatcher.java:38)
com.xuhao.didi.socket.client.impl.client.action.ActionDispatcher$ActionRunnable.run(ActionDispatcher.java:280)
android.os.Handler.handleCallback(Handler.java:751)
android.os.Handler.dispatchMessage(Handler.java:95)
android.os.Looper.loop(Looper.java:154)
android.app.ActivityThread.main(ActivityThread.java:6121)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)