How to prevent errno 32 broken pipe?
Currently I am using an app built in python. When I run it in personal computer, it works without problems.
Currently I am using an app built in python. When I run it in personal computer, it works without problems.
I’ve written a simple multi-threaded game server in python that creates a new thread for each client connection. I’m finding that every now and then, the server will crash because of a broken-pipe/SIGPIPE error. I’m pretty sure it is happening when the program tries to send a response back to a client that is no longer present.
Question: Is there a way to use flush=True for the print() function without getting the BrokenPipeError?