andreachild commented on code in PR #3204:
URL: https://github.com/apache/tinkerpop/pull/3204#discussion_r2418070504


##########
gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js:
##########
@@ -415,7 +417,9 @@ class Connection extends EventEmitter {
     });
     this._ws.removeEventListener('open', this.#handleOpen);
     this._ws.removeEventListener('error', this.#handleError);
-    this._ws.off('unexpected-response', this.#handleUnexpectedResponse);
+    if (!useGlobalWebSocket) {

Review Comment:
   This fails as `useGlobalWebSocket` is not defined here so you'll have to 
define it or go back to your original fix
   ```suggestion
       // Only remove unexpected-response listener for Node.js WebSocket (ws 
package)
       // Browser WebSocket does not have this event and .off() method
       if (this._ws && 'off' in this._ws) {
   ```



-- 
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]

Reply via email to