Open
Description
Describe the bug
After socket emits error there is no code executed after that.
To Reproduce
My code is for work with Twitter stream
Server
.stream
.on("data", (data) => {
console.log("pojawily sie jakie dane");
try {
const json = JSON.parse(data);
if (json.connection_issue) {
socket.emit("error",json);
reconnect(stream,socket,token); //not executed
} else {
if (json.data) {
socket.emit("tweet",json);
fs.appendFileSync("log.txt",json); // not executed
}
else {
socket.emit("AuthError",json);
console.log("trying to reconnect"); //not executed
reconnect(stream,socket,token,timeout); //not executed
}
}
Expected behavior
Normal code execution
Platform:
- Device: VPS
- OS: Ubuntu 18.04
Additional context
Add any other context about the problem here.