You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2023/03/24 11:16:58 UTC
[linkis] branch dev-1.3.2 updated: Fix socket session resource leakage (#4407)
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.3.2
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
new 24dc97820 Fix socket session resource leakage (#4407)
24dc97820 is described below
commit 24dc97820a347322f184079ef71f6964501647b0
Author: wangzhen <ti...@gmail.com>
AuthorDate: Fri Mar 24 19:16:51 2023 +0800
Fix socket session resource leakage (#4407)
Co-authored-by: 王振 <wa...@qq.com>
---
.../gateway/springcloud/websocket/WebsocketGatewaySession.scala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/scala/org/apache/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala b/linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/scala/org/apache/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala
index c9c05776d..29c42996f 100644
--- a/linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/scala/org/apache/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala
+++ b/linkis-spring-cloud-services/linkis-service-gateway/linkis-spring-cloud-gateway/src/main/scala/org/apache/linkis/gateway/springcloud/websocket/WebsocketGatewaySession.scala
@@ -84,8 +84,7 @@ class GatewayWebSocketSessionConnection(
}
}
- // todo
- def getAddress: InetSocketAddress = null
+ def getAddress: InetSocketAddress = webSocketSession.getHandshakeInfo.getRemoteAddress;
def getProxyWebSocketSession(
serviceInstance: ServiceInstance
@@ -192,8 +191,7 @@ class GatewayWebSocketSession private (
protected var webSocketConnection: WebSocketConnection = _
- // todo
- def isAlive: Boolean = true
+ def isAlive: Boolean = !webSocketConnection.getInbound.receiveCloseStatus().subscribe().isDisposed
override def receive(): Flux[WebSocketMessage] = webSocketConnection.getInbound
.aggregateFrames(ServerConfiguration.BDP_SERVER_SOCKET_TEXT_MESSAGE_SIZE_MAX.getValue.toInt)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org