Unlike REPLs (read-eval-print-loop), compiled programs are not meant to execute indefinitely, and will terminate when the end of the program has been reached.
When a program terminates, a special message should be sent to notify the client that further user input will be ignored and no further output is to be expected.