-
Notifications
You must be signed in to change notification settings - Fork 18
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. |
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: