UDPUtils.send 中报错了,虽然最后是能链接上,但是总感觉不爽,
是什么原因导致的呢? 各位大佬,看看呢
06-12 00:59:41.650 6903-10844/com.srbl.mytx W/LocalUDPDataReciever: 【IMCORE】本地UDP监听停止了(socket被关闭了?):,应该是用户退出登陆或网络断开了。
06-12 00:59:41.651 6903-7168/com.srbl.mytx E/UDPUtils: 【IMCORE】send方法中》》发送UDP数据报文时出错了,原因是:sendto failed: EPERM (Operation not permitted)
java.net.SocketException: sendto failed: EPERM (Operation not permitted)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
at libcore.io.IoBridge.sendto(IoBridge.java:511)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendKeepAlive(LocalUDPDataSender.java:136)
at net.openmob.mobileimsdk.android.core.KeepAliveDaemon$1$1.doInBackground(KeepAliveDaemon.java:146)
at net.openmob.mobileimsdk.android.core.KeepAliveDaemon$1$1.doInBackground(KeepAliveDaemon.java:137)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: sendto failed: EPERM (Operation not permitted)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:211)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:509)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendKeepAlive(LocalUDPDataSender.java:136)
at net.openmob.mobileimsdk.android.core.KeepAliveDaemon$1$1.doInBackground(KeepAliveDaemon.java:146)
at net.openmob.mobileimsdk.android.core.KeepAliveDaemon$1$1.doInBackground(KeepAliveDaemon.java:137)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
06-12 00:59:41.663 6903-6903/com.srbl.mytx E/IMClientManager: 【DEBUG_UI】与IM服务器的网络连接出错关闭了,error:-1
06-12 00:59:41.686 6903-7167/com.srbl.mytx E/UDPUtils: 【IMCORE】send方法中》》发送UDP数据报文时出错了,原因是:sendto failed: EPERM (Operation not permitted)
java.net.SocketException: sendto failed: EPERM (Operation not permitted)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
at libcore.io.IoBridge.sendto(IoBridge.java:511)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendLogin(LocalUDPDataSender.java:82)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:119)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:108)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: sendto failed: EPERM (Operation not permitted)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:211)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:509)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendLogin(LocalUDPDataSender.java:82)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:119)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:108)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
06-12 00:59:42.612 6903-6903/com.srbl.mytx I/_adjTransferRate: UT:millseconds:30000
06-12 00:59:42.626 6903-6903/com.srbl.mytx I/Native: InetIO_SetForeground 1
06-12 00:59:42.626 6903-6903/com.srbl.mytx I/imservice@native@im: setForeground:1
06-12 00:59:43.696 6903-7179/com.srbl.mytx E/UDPUtils: 【IMCORE】send方法中》》发送UDP数据报文时出错了,原因是:sendto failed: ECONNREFUSED (Connection refused)
java.net.SocketException: sendto failed: ECONNREFUSED (Connection refused)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:542)
at libcore.io.IoBridge.sendto(IoBridge.java:511)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendLogin(LocalUDPDataSender.java:82)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:119)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:108)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: android.system.ErrnoException: sendto failed: ECONNREFUSED (Connection refused)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:211)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:509)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:88)
at net.openmob.mobileimsdk.android.utils.UDPUtils.send(UDPUtils.java:50)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.send(LocalUDPDataSender.java:283)
at net.openmob.mobileimsdk.android.core.LocalUDPDataSender.sendLogin(LocalUDPDataSender.java:82)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:119)
at net.openmob.mobileimsdk.android.core.AutoReLoginDaemon$1$1.doInBackground(AutoReLoginDaemon.java:108)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
06-12 00:59:45.732 6903-6903/com.srbl.mytx I/IMClientManager: 【DEBUG_UI】IM服务器登录/重连成功!