title: WebSocket is not open: readyState 2 (CLOSING)
body: <p>On a cold start, my Lambda functions will return this error when trying to initialize a connection with Neptune. After that, the connection succeeds with no error. If the Lambda goes cold again the error returns.</p>
  
  <pre class="lang-js prettyprint-override"><code>    const dc = new DriverRemoteConnection(
        `wss://${process.env.NEPTUNE_ENDPOINT}:${process.env.NEPTUNE_PORT}/gremlin`,
        {}
      );
      const graph = new Graph();
      const g = graph.traversal().withRemote(dc);
      g.V();
      dc.close();
  </code></pre>
  
  <p>Using <code>gremlin@^3.4.6</code> and Node 12.x. I found a similar error being reported against the ws package which was dismissed as an implementation error.
  <a href="https://github.com/websockets/ws/issues/1410" rel="nofollow noreferrer">https://github.com/websockets/ws/issues/1410</a></p>
  
  <p>Do we need to somehow verify connections in advance when using Gremlin?</p>
  
  <p>Edit: This problem seems to have started with <code>gremlin@3.4.6</code>. If I downgrade to <code>gremlin@3.4.5</code> the problem goes away.</p>
  
  <p>Edit 2: Got the error again with 3.4.5. 3.4.4 seems better.</p>