[ https://issues.apache.org/jira/browse/TINKERPOP-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515637#comment-16515637 ]
Robert Dale commented on TINKERPOP-1978: ---------------------------------------- I think if you limit the scope of this to testing only if there is a viable connection to the server, it can easily be achieved by checking the WebSocket state (is it open?) and/or with a WebSocket ping (is it still connected?). It could be a user option as to which method is used (what are the app requirements?) Ideally, the driver would also have the option of background checking to mitigate any in-line call latency. ;) > Check for Websocket connection state when retrieved from Connection Pool > missing > -------------------------------------------------------------------------------- > > Key: TINKERPOP-1978 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1978 > Project: TinkerPop > Issue Type: Bug > Components: dotnet > Affects Versions: 3.3.3 > Reporter: Jamilu Abubakar > Priority: Major > > When retrieving a connection from the connection pool there is no check to > see what the current connection state of the websocket is before it is used. > This means that if the websocket were to be closed because the server > recycled or the connection was aborted by the server since it was last used > and its Send method were to be called the following exception would be thrown: > {quote}Error during execution ExecuteJObjectQueryAsync method. Exception: > System.Net.Http.WinHttpException (0x80072EFF): The connection with the server > was terminated abnormally > at System.Net.WebSockets.WinHttpWebSocket.SendAsync(ArraySegment`1 buffer, > WebSocketMessageType messageType, Boolean endOfMessage, CancellationToken > cancellationToken) > at System.Net.WebSockets.WebSocketHandle.SendAsync(ArraySegment`1 buffer, > WebSocketMessageType messageType, Boolean endOfMessage, CancellationToken > cancellationToken) > at Gremlin.Net.Driver.WebSocketConnection.<SendMessageAsync>d__5.MoveNext() > {quote} > > Please add check the Websocket state before use, handle exceptions due to > closed or aborted connections and ideally have an extensible retry handler. -- This message was sent by Atlassian JIRA (v7.6.3#76005)