Skip to content

Instantly share code, notes, and snippets.

View ProbablePrime's full-sized avatar
😍
Making memes

ProbablePrime ProbablePrime

😍
Making memes
View GitHub Profile
var attempts = 1;
function createWebSocket () {
var connection = new WebSocket();
connection.onopen = function () {
// reset the tries back to 1 since we have a new connection opened.
attempts = 1;
// ...Your app's logic...