And I cannot start a new instance of the application I am debugging for a few minutes after it was killed or SEGFAULT-ed
Asked
Active
Viewed 1,428 times
1 Answers
2
you have to set REUSEADDR
for the socket:
E.g. in Python.
socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
Please add more info to your question. What programming language do you use? Show some example code or error output.
Have a look at this post for a more complete answer: https://stackoverflow.com/a/6380198/1668622
-
Thanks, I didn't realize the operating system doesn't free a socket immediately after an application crashes and I need to set the reuse flag. There seems to be some sort of a timeout for that in linux? – mambo_sun Mar 18 '15 at 13:01