Program ends prematurely

Started by TheTinyDeskEngineer, May 14, 2021, 02:35 pm

Previous topic - Next topic

TheTinyDeskEngineer

I'm working on a program that allows a computer to host files uploaded by other players and to allow players to easily find uploaded files they want, but when I try to click on any of the buttons I put at the top of the homepage after entering the hostname, the program just closes to the shell immediately. No error, just closing to the shell.

Here's the pastebin code for the client: K0fafZpr
And the code for the server: 8N3KfubQ

Lupus590

The function is probably returning. You don't loop anywhere in your program, instead, you are recursively calling the same function each time you do something with the event you pull.

I would restructure the program to use a while true loop and then call break when you want to exit the program.