Skip to content

Commit

Permalink
Don't warn when setting SO_KEEPALIVE
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed May 19, 2022
1 parent bec5834 commit e78a2e4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/async_solipsism/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ def setsockopt(self, level, optname, value, optlen=None):
if key not in {
(socket.IPPROTO_TCP, socket.TCP_NODELAY),
(socket.SOL_SOCKET, socket.SO_REUSEADDR),
(socket.SOL_SOCKET, socket.SO_REUSEPORT)
(socket.SOL_SOCKET, socket.SO_REUSEPORT),
(socket.SOL_SOCKET, socket.SO_KEEPALIVE)
}:
warnings.warn(f'Ignoring socket option {level}:{optname}', SolipsismWarning)
warnings.warn(
f'Ignoring socket option {level}:{optname}', SolipsismWarning, stacklevel=2
)
# TODO: implement SO_RCVBUF/SO_SNDBUF to change the queue capacity.


Expand Down

0 comments on commit e78a2e4

Please # to comment.