private void handleConnectionCleanupOnError(final Connection thisConnection) {
        if (thisConnection.isDead()) {
            if (pool != null) pool.replaceConnection(thisConnection);
        } else {
            thisConnection.returnToPool();
        }
    }
Consider a connection as dead if the underlying channel is not connected.
<p>
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.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Connection.java