-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to join an unexisting channel doesnt let you join correct channels #163
Comments
i think i have where the problem is client.prototype._sendCommand = function _sendCommand(delay, channel, command, fn) {
// Race promise against delay..
return new Promise((resolve, reject) => {
_.promiseDelay(delay).then(() => { reject("No response from Twitch."); });
// Make sure the socket is opened..
if (!_.isNull(this.ws) && this.ws.readyState !== 2 && this.ws.readyState !== 3) {
// Executing a command on a channel..
if (!_.isNull(channel)) {
this.log.info(`[${_.channel(channel)}] Executing command: ${command}`);
this.ws.send(`PRIVMSG ${_.channel(channel)} :${command}`);
}
// Executing a raw command..
else {
this.log.info(`Executing command: ${command}`);
this.ws.send(command);
}
fn(resolve, reject);
}
// Disconnected from server..
else { reject("Not connected to server."); }
});
}; The command sent is raced against a timer, the first time the timer expires so it emits the error from timing out. I dont know how to fix it but maybe it helps you out. |
Okei, i found the problem. If you comment the line 171 of events.js inside the function once The next time someone tries to join another channel the listener gets stored as "_promiseJoin2". |
I'm investigating this, thanks! |
I found the problem, will need to figure out how to fix it, when joining a channel that doesn't exist, Twitch is not returning anything, no error/notice. The way our custom event listeners library works, we need to fire |
Yeah, you relay on the timeout to notice that you coudnt join the channel. I tried to remove the event if the timeout expires, but i dont fully understand they way the code works and it did some weird behavior. |
Tittle is self explanatory.
I try to join a random channel that i know it doesnt exist to report that error on the app, but after an failed attemp to join a chat the next ones do not work even with correct ones, i have to completely reconect to the serve to make it work again. This is the log i get catching the error like in the wiki
It clearly says that i joined the channel, but the code goes to the reject part of the Promise
The text was updated successfully, but these errors were encountered: