0

I am running a Python script in Windows which is basically a simple UDP server. Most of the time the program will wait on recv_data, addr = server_socket.recvfrom(2048). I have two issues:

  1. I am not able to kill this program without closing the console. This is not a big issue as I can close the console and restart the program. But still...

  2. Even when I close the console, most of the time, the socket is not getting closed properly. I could see the program in a killed state. So I have to change the port every time I restart. Even when I do not see the program in killed state and holding the socket, the server is not able to receive any packets. (And yes I am using SO_REUSEADDR for my server socket.)

Any ideas?

Eryk Sun
  • 33,190
  • 5
  • 92
  • 111
user2148707
  • 93
  • 12

0 Answers0