Closed Bug 538008 Opened 15 years ago Closed 15 years ago

SSLTunnel won't startup if a previous instance was killed with sockets still opened

Categories

(Testing :: Mochitest, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: mossop, Assigned: mossop)

References

Details

(Whiteboard: [fixed1.9.2.1, fixed1.9.1.8])

Attachments

(1 file)

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.
Blocks: 478241
Blocks: 435743
Attached patch patch rev 1 (deleted) — Splinter Review
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+
Version: unspecified → Trunk
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: