MCPcopy
hub / github.com/benoitc/gunicorn / close_sockets

Function close_sockets

gunicorn/sock.py:230–235  ·  view source on GitHub ↗
(listeners, unlink=True)

Source from the content-addressed store, hash-verified

228
229
230def close_sockets(listeners, unlink=True):
231 for sock in listeners:
232 sock_name = sock.getsockname()
233 sock.close()
234 if unlink and _sock_type(sock_name) is UnixSocket:
235 os.unlink(sock_name)
236
237
238def _get_alpn_protocols(conf):

Callers

nothing calls this directly

Calls 4

_sock_typeFunction · 0.85
unlinkMethod · 0.80
getsocknameMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected