yhs0092 commented on PR #4649: URL: https://github.com/apache/servicecomb-java-chassis/pull/4649#issuecomment-2565447062
There is a race condition case: Suppose a server provides an controller operation that receive the WebSocket handshake request, and it needs to forward the WebSocket stream to another backend. If the client side WebSocket throws an Exception when the server side WebSocket has not been prepared(i.e. the server side `WebSocketAdapter` has not been set into the `ServerWebSocket`), and the user code want to close the corresponding `ServerWebSocket`, then a NullPointException will occur. ``` 1. client ---handshaking---> server1 ---handshaking---> server2 2. |--- error occurs here. 3. |---- close this websocket when it's not opened. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
