Suppose that I have the following code:
import socket
listener = socket.socket()
listener.bind(('0.0.0.0', 59535))
while True:
conn, addr = listener.accept()
worker_thread = threading.Thread(target=client_handler, args=(conn, addr,)).start()
What will happen if new client will try to connect to our listener socket while we're creating worker thread? Will he wait for the next accept call or will it just rejected? If he'll wait, how many clients can be in that queue simultaneously by default (yeah, I know that I can set it via listen
function)?