-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket Closed when stop() #48
Comments
when I tried to change the "Socket closed" to "socket closed" in com.mbed.coap.transport.udp.DatagramSocketTransport, it seems that it could solve this problem, but I don't know whether this change is what the contributor want. source: if (!ex.getMessage().startsWith("Socket closed")) { |
Hi @KeithLaiKB, How about checking against " |
I think it could be ok if (!ex.getMessage().contains("ocket closed")), it might work, but it might also be the potential risk in the future. |
when I try to test the example
java-coap/coap-core/src/test/java/protocolTests/ClientServerTest.java
(https://github.com/PelionIoT/java-coap/blob/master/coap-core/src/test/java/protocolTests/ClientServerTest.java)
case:
when server.stop() or client.stop(), the console would show "java.net.SocketException: socket closed"
process:
when I traced this process, I found it sources from DatagramSocketTransport.stop() method and LOGGER.error(e.getMessage(), e); in the method, the code line about "TransportExecutors.shutdown(readingWorker);" in this method couldn't run.
Should we deal with it or need to ignore it.
The text was updated successfully, but these errors were encountered: