MCPcopy Index your code
hub / github.com/secdev/scapy / cleanup_testsockets

Function cleanup_testsockets

test/testsocket.py:181–190  ·  view source on GitHub ↗

Helper function to remove TestSocket objects after a test

()

Source from the content-addressed store, hash-verified

179
180
181def cleanup_testsockets():
182 # type: () -> None
183 """
184 Helper function to remove TestSocket objects after a test
185 """
186 count = max(len(open_test_sockets), 1)
187 while len(open_test_sockets) and count:
188 sock = open_test_sockets[0]
189 sock.close()
190 count -= 1

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected