diff options
author | Pierre Ossman (ThinLinc team) <ossman@cendio.se> | 2023-11-08 16:10:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 16:10:10 (GMT) |
commit | 74b868f636a8af9e5540e3315de666500147d47a (patch) | |
tree | e36a68b54fee50c800155c22ba796dcdbaab498c /Doc/library | |
parent | f88caab467eb57cfe293cdf9fb7cce29b24fda7f (diff) | |
download | cpython-74b868f636a8af9e5540e3315de666500147d47a.zip cpython-74b868f636a8af9e5540e3315de666500147d47a.tar.gz cpython-74b868f636a8af9e5540e3315de666500147d47a.tar.bz2 |
gh-111246: Remove listening Unix socket on close (#111483)
Try to clean up the socket file we create so we don't add unused noise to the file system.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-eventloop.rst | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 3911d2c..ea1d146 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -778,7 +778,7 @@ Creating network servers *, sock=None, backlog=100, ssl=None, \ ssl_handshake_timeout=None, \ ssl_shutdown_timeout=None, \ - start_serving=True) + start_serving=True, cleanup_socket=True) Similar to :meth:`loop.create_server` but works with the :py:const:`~socket.AF_UNIX` socket family. @@ -788,6 +788,10 @@ Creating network servers :class:`str`, :class:`bytes`, and :class:`~pathlib.Path` paths are supported. + If *cleanup_socket* is True then the Unix socket will automatically + be removed from the filesystem when the server is closed, unless the + socket has been replaced after the server has been created. + See the documentation of the :meth:`loop.create_server` method for information about arguments to this method. @@ -802,6 +806,10 @@ Creating network servers Added the *ssl_shutdown_timeout* parameter. + .. versionchanged:: 3.13 + + Added the *cleanup_socket* parameter. + .. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \ sock, *, ssl=None, ssl_handshake_timeout=None, \ |