0

And I cannot start a new instance of the application I am debugging for a few minutes after it was killed or SEGFAULT-ed

mambo_sun
  • 509
  • 4
  • 13
  • possible duplicate of [Python: Binding Socket: "Address already in use"](http://stackoverflow.com/questions/6380057/python-binding-socket-address-already-in-use) – frans Mar 18 '15 at 12:44

1 Answers1

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

Community
  • 1
  • 1
frans
  • 8,868
  • 11
  • 58
  • 132
  • 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