May-20-2019, 07:56 PM
Never mind, I found out what is going on. It is not similar to that other question. What is going on is for some reason in order to get a loop to process the socket I need to pass the socket argument directly to the function that creates the loop. So by passing the socket to the Thread __init__ function and making it an attribute of the thread was not working. Instead I have to call the run function directly and pass the socket to it. But doing that wont make the thread work properly so I can't set up a thread like that. Instead I have to use _thread and call _thread.start_new_thread to call a function that creates a loop to manage the connection and pass the socket to that function.