I am running a thread that constantly listen on my port but the problem is when I shut the program down the thread may continue to run so when I restaart I get an error ... Im reading on the web I should kill the thread but ask it to stop but I cant find any examples
host = ''
port = 51269
backlog = 5
size = 1000000
addr = (socket.gethostname(), port)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)