Socket异常,该怎么处理--我找了好久没发现在哪里,导致后面的无法通信

发布于 2021-11-13 19:56:29 字数 3032 浏览 832 评论 3

java.net.SocketException: Socket closed

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)

at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)

at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1249)

at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1203)

at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1387)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)

at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1538)

at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)

at com.softfz.client.thread.ClientReaderThread.sendToServer(ClientReaderThread.java:272)

at com.softfz.client.view.ClientTalkFrame.sendAction(ClientTalkFrame.java:216)

at com.softfz.client.view.ClientTalkFrame.actionPerformed(ClientTalkFrame.java:194)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6134)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)

at java.awt.Component.processEvent(Component.java:5899)

at java.awt.Container.processEvent(Container.java:2023)

at java.awt.Component.dispatchEventImpl(Component.java:4501)

at java.awt.Container.dispatchEventImpl(Container.java:2081)

at java.awt.Component.dispatchEvent(Component.java:4331)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)

at java.awt.Container.dispatchEventImpl(Container.java:2067)

at java.awt.Window.dispatchEventImpl(Window.java:2458)

at java.awt.Component.dispatchEvent(Component.java:4331)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

顾挽 2021-11-17 07:24:12

Socket closed 

这个socket通信已经关闭了,自己检查代码

平定天下 2021-11-17 05:37:48

```````````````````````

明媚如初 2021-11-14 19:38:09

大神们,帮帮忙哦。。。。。  

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文