Then you are running a program in a remote server over telnet, ssh, etc, the program will be killed when your connection is closed.
A way to avoid it is using the screen program:
$ screen
$ ./my-app
Ctrl-A and then Ctrl-D
$ exit
You can reconnect to the server you can attach back to your application using the command:
$ screen -r
Source: https://medium.com/@arnab.k/how-to-keep-processes-running-after-ending-ssh-session-c836010b26a3