Closed Bug 538008 Opened 10 years ago Closed 10 years ago
SSLTunnel won't startup if a previous instance was killed with sockets still opened
If SSLTunnel is killed when it still has some connections opened then the connections are closed but (at least on linux) remain in the TIME_WAIT state for a short time. This stops a subsequent instance of SSLTunnel from starting as it fails to bind to the still open socket. We can avoid this by setting the SO_REUSEADDR option before attempting to bind. This will allow rebinding an existing socket in the TIME_WAIT state. The alternative would be delaying for short times if unable to bind but this seems the most elegant solution.
Simple fix, just sets the Reuseaddr option on the socket before binding.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #420224 - Flags: review?(ted.mielczarek)
Attachment #420224 - Flags: review?(ted.mielczarek) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Whiteboard: [fixed126.96.36.199, fixed188.8.131.52]
You need to log in before you can comment on or make changes to this bug.