Open priyabratap opened 3 years ago
Hi @priyabratap, thank you for your comment.
The autoReconnect
option should already work as you describe, when the socket is closed, the _closeHandler
event is triggered, and a connection attempt is made.
_statusCallback
event is called with an error, so it will call the _errorHandler
, and the connection will be retried while the try
value is lower than maxRetry
. try
value is reset to 0 (L86), and so on the next disconnection it will retry maxRetry
times. Did you encounter a case that doesn't work like described above? I'd be happy to help you solve your issue.
Also, if you wish to contribute more, you can suggest any pull request or issue, Just please follow the code of conduct
Hi @fabrice404 , thank you for the detailed clarification and I got it.
Two generic queries,
gremlin.driver.RemoteConnection
directly)Thanks @fabrice404 Now we can close this.
Hi @fabrice404
Do you have the typescript support of it? currently, I have installed this one npm install --save @types/gremlin
First of all, I would like to thank you for the beautiful wrapper connection with IAM authenitcation.
There is an AWS neptune limitation : When IAM authentication is enabled, a WebSocket connection is always disconnected a few minutes more than 10 days after it was established, if it hasn't already been closed by then.
I saw there is one option to enable autoReconnect with a maxRetry (default is 10). Once we reached maxRetry then because of the Neptune Limitation, the connection will be disconnected after 10days.
Very high level, I can think about a solution to make the autoReconnect a default option in case of _closeHandler. Additionally, we can log the _closeHandler behaviour to know about the timing of disconnect exactly after 10days or not.
Love to hear a better solution to address the above issue. Also, I am very interested to contribute here.