Commit 34aa103e authored by Denis Bilenko's avatar Denis Bilenko

socket: deprecate set_reuse_addr

parent 672c0b6f
......@@ -620,6 +620,8 @@ def socket_bind_and_listen(*args, **kwargs):
def set_reuse_addr(descriptor):
import warnings
warnings.warn("gevent.socket.set_reuse_addr is deprecated", DeprecationWarning, stacklevel=2)
try:
descriptor.setsockopt(SOL_SOCKET, SO_REUSEADDR, descriptor.getsockopt(SOL_SOCKET, SO_REUSEADDR) | 1)
except error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment