我们在服务器日志中看到java.net.SocketException: socket closed
(服务器侦听UDP端口1812)。但我们看不到关闭底层DatagramSocket
的服务器的任何痕迹。这是堆栈跟踪:
java.net.SocketException: socket closed
at java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.receive0(Unknown Source)
at java.net.AbstractPlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at java.lang.Thread.run(Unknown Source)
问题是,除了创建套接字的应用程序之外,还有谁可以关闭它?
(如果相关的是服务器在带有Java 8的Windows上运行。)