spmallette commented on a change in pull request #1081: TINKERPOP-2169/2173
Responses exceeding maxContentLength cause subsequent queries to hang
URL: https://github.com/apache/tinkerpop/pull/1081#discussion_r264626104
##########
File path:
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java
##########
@@ -133,8 +126,14 @@ public int availableInProcess() {
return Math.max(0, maxInProcess - pending.size());
}
+ /**
+ * Consider a connection as dead if the underlying channel is not
connected.
+ *
+ * Note: A dead connection does not necessarily imply that the server is
unavailable. Additional checks
+ * should be performed to mark the server host as unavailable.
+ */
public boolean isDead() {
- return isDead;
+ return (channel !=null && !channel.isActive());
Review comment:
i like that you got rid of the `isDead` boolean. nice
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services