What is weird is that there’s no functional difference between the old code (calls a function unhost() than calls a function sendMessage() that writes on the socket the .unhost private message; the same code was used successfully to host a given Twitch channel) and the new code (writes directly on the socket).
I will try to duplicate the call to unhost to see if it makes a difference. Thanks for chiming in 