LiteIDE: how to stop http server


(cinematik) #1
func main() {
    http.HandleFunc("/", sroot)
    http.ListenAndServe(":8080", nil)
}

I started it by Build Menu > FileRun.
And then stopped it by Build Menu > Stop action.
IDE’s output console shows:

Error: process crashed or was terminated while running.

But the process main.exe is still running in the os.
How to properly stop http server from within LiteIDE?


(George Calianu) #2

Your problem is not about LiteIDE but operating system. While you run your program in user mode probably you should stop the application as privileged user. Try running LiteIDE ar administrator.


(cinematik) #3

The problem was in the way I started it. When I run it like BuildAndRun it works and stops as expected.