-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to stop the Agent #148
Comments
Hello @sammachin, have you tried the |
@nikolay-ngrok Hi, thanks for responding, tried both the |
Another option to try is to control the session explicitly - instead of using the listener factory methods, you could connect a session and later close it when you need? e.g. start with https://github.com/ngrok/ngrok-javascript/blob/main/examples/ngrok-http-minimum.js#L13 and then do https://ngrok.github.io/ngrok-javascript/classes/Session.html#close when you need it? |
@nikolay-ngrok creating the session manually seems to work, but thats a lot of work to do in my code to refactor it for all the options that a user can set, any chance this can be fixed in the ngrok module so that at least |
just dropping a note here that we're actively working through the design of the next api rev for our SDKs and this is one of the improvements we're going to work on incorporating into the design |
I then have an wish, if this is not in the pipe line. |
@inconshreveable Thanks Alan, what sort of timeframe are we looking at to update the SDK? I could refactor my library to control the session directly but thats not a small amount of work and I don't really want to invest my time if its going to be solved upstream as soon as I finish! |
@sammachin i can't commit to a timeline here but i'd say "no earlier than october" @grawsom it sounds like you're asking for the SDK to close the session when you use the dashboard 'stop' function, yes? |
@inconshreveable I'm just a user and when I install the Ngrok the "normal" way i then have some control in the website. https://dashboard.ngrok.com/tunnels/agents How it would work in your code i don't know, i just know that you could not do this by @sammachin package that uses you code. |
@inconshreveable just wondering if there's any news on this? I've not had a chance to make all the changes in my app yet and not sure when I'll have the capacity |
I'm updating the VSCode extension and I've just come across this issue too. Is there any update on this? Or is handling the session manually the only way to close the agent down for now? |
hi @philnash, thanks for the comment. Unfortunately, right now, handling the session manually is the right way to do it. I don't have an updated ETA on the timing for the next rev, but it has been delayed and won't happen until next year. |
When I close a connection using either the
listener.close()
or thengrok.disconnect(listener.url())
methods it does not close down the agent session, I can see the agent still active in my dashboard (with 0 tunnels)This means that I am unable to start a new agent on another machine as I get the error:
According to the docs:
The close method on a listener will shut it down, and also stop the ngrok session if it is no longer needed.
But this does not seem to be working on either 1.0.0, or 1.3.0The text was updated successfully, but these errors were encountered: