I added this as a result of unreliable thread disposal via existing methods.
Occasionally the irc socket will simply stop receiving from Twitch and become stuck in the socket.recv method (irc.py line 88). This is resolved by setting a reasonable socket timeout closing stuck threads.
The 'thread_close' callback was also added to allow for recovery of chat functionality by the host application, subscribers have an accurate way of knowing when the previous connection has fully closed and creating a new one if desired.
I added this as a result of unreliable thread disposal via existing methods. Occasionally the irc socket will simply stop receiving from Twitch and become stuck in the socket.recv method (irc.py line 88). This is resolved by setting a reasonable socket timeout closing stuck threads. The 'thread_close' callback was also added to allow for recovery of chat functionality by the host application, subscribers have an accurate way of knowing when the previous connection has fully closed and creating a new one if desired.