SI SoftEndOfStreamException:当客户端断开连接时,流在有效负载之间关闭
SI SoftEndOfStreamException: Stream closed between payloads when client disconnects
我在 tcp-inbound-gateway 上有一个 Spring 集成服务器 运行 和一个使用常规 [=24] 连接到服务器的客户端=] 套接字。
客户端连接到服务器,服务器处理请求然后发送响应。客户端读取响应,然后使用 socket.close() 关闭连接。
在服务器端,我配置了一个 tcp-connection-event-inbound-channel-adapter,我看到了这个:
TcpConnectionExceptionEvent [source=org.springframework.integration.ip.tcp.connection.TcpNetConnection@2294e71d, cause=org.springframework.integration.ip.tcp.serializer.SoftEndOfStreamException: Stream closed between payloads], [factory=crLfServer, connectionId=127.0.0.1:52292:5556:add2ff2a-b4ff-410d-8e60-d6b1a388044e]
这是正常行为吗?
是;这很正常——只要套接字上发生异常,我们就会发出应用程序事件,SoftEndOfStreamException
发生在套接字关闭时 "normally"(即在消息之间)。
我想我们可以抑制那个特定的事件,但有些人发现它很有用。
我在 tcp-inbound-gateway 上有一个 Spring 集成服务器 运行 和一个使用常规 [=24] 连接到服务器的客户端=] 套接字。
客户端连接到服务器,服务器处理请求然后发送响应。客户端读取响应,然后使用 socket.close() 关闭连接。
在服务器端,我配置了一个 tcp-connection-event-inbound-channel-adapter,我看到了这个:
TcpConnectionExceptionEvent [source=org.springframework.integration.ip.tcp.connection.TcpNetConnection@2294e71d, cause=org.springframework.integration.ip.tcp.serializer.SoftEndOfStreamException: Stream closed between payloads], [factory=crLfServer, connectionId=127.0.0.1:52292:5556:add2ff2a-b4ff-410d-8e60-d6b1a388044e]
这是正常行为吗?
是;这很正常——只要套接字上发生异常,我们就会发出应用程序事件,SoftEndOfStreamException
发生在套接字关闭时 "normally"(即在消息之间)。
我想我们可以抑制那个特定的事件,但有些人发现它很有用。