The console application does not terminate after a successful request
See original GitHub issueI developing console application on Kotlin. If I make a request from the main thread and request finishes (successful or not, doesn’t matter) application won’t close for a minute. Is that normal behavior? Is there a way to stop execution right after result handler finishes its execution?
Request:
Fuel.get("/info").responseString { _, _, result ->
when (result) {
is Result.Failure -> {
println("Failure")
}
is Result.Success -> {
println("Success")
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
C# console application does not terminate in command ...
I have developed a console application in c#. When I invoke developed command in command window and minimise it to work on other...
Read more >Terminating a c# Console application - Stack Overflow
If you are starting console application from Visual Studio not in debug mode (Ctrl+F5), then console window stays open after application finished execution....
Read more >How to terminate a .NET console application with an exit code
It happens that you'd like to terminate a .NET console application with some exit code. Normally exit codes are integers where negative ...
Read more >Gracefully terminate a threaded C# console application on ...
So, most console applications seemingly terminate instantly when they receive a CTRL+C , but occasionally you may notice that some have a ...
Read more >Terminate your instance - Amazon Elastic Compute Cloud
Instance termination. After you terminate an instance, it remains visible in the console for a short while, and then the entry is automatically...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fuel
opens a daemon thread that prevents the JVM from shutdown. You can try this code to shutdownFuel
, though it should probably provide a better masochism for that:Is someone familiar with how OKHttp handles that?
Just noticed the same problem. I’m guessing it’s a problem with the jvm waiting for the async thread to officially close, because if you use the non-async version it terminates immediately.