Created
May 14, 2021 17:55
-
-
Save amitrahav/e4899fb69add52b53577b70ab62bb1c3 to your computer and use it in GitHub Desktop.
SocketVsSSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Listen for possible errors | |
evtSource.onerror = function() { | |
console.log("EventSource failed."); | |
}; | |
// Listen for possible errors | |
socket.addEventListener("error", function (event) { | |
console.log("WebSocket error:", event); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment