From deaef2f9d62bb8ae7f4e8538e9fd9ddffbb8ebb2 Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Wed, 4 May 2016 16:48:28 -0700 Subject: [PATCH] Remove unneeded setting of SO_REUSEADDR. This has been in eventlet.listen() since version 0.15. Change-Id: Ib77b28231a2180f1ea082f356c4687c39681a6f7 --- swift/common/wsgi.py | 1 - test/unit/common/test_wsgi.py | 1 - 2 files changed, 2 deletions(-) diff --git a/swift/common/wsgi.py b/swift/common/wsgi.py index 2c169eb2a6..a44d9d6c93 100644 --- a/swift/common/wsgi.py +++ b/swift/common/wsgi.py @@ -199,7 +199,6 @@ def get_socket(conf): raise Exception(_('Could not bind to %s:%s ' 'after trying for %s seconds') % ( bind_addr[0], bind_addr[1], bind_timeout)) - sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # in my experience, sockets can hang around forever without keepalive sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) diff --git a/test/unit/common/test_wsgi.py b/test/unit/common/test_wsgi.py index f39f215499..d4c1d68f39 100644 --- a/test/unit/common/test_wsgi.py +++ b/test/unit/common/test_wsgi.py @@ -276,7 +276,6 @@ class TestWSGI(unittest.TestCase): self.assertTrue(isinstance(sock, MockSocket)) expected_socket_opts = { socket.SOL_SOCKET: { - socket.SO_REUSEADDR: 1, socket.SO_KEEPALIVE: 1, }, socket.IPPROTO_TCP: {