From 0dbc1ba692b6302f6545454b0e2897578dfdbb72 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 3 May 2013 17:39:21 -0400 Subject: [PATCH] restricted the user.get socket listener to only react once --- public/templates/footer.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/templates/footer.tpl b/public/templates/footer.tpl index dd3de05b00..287212a0e9 100644 --- a/public/templates/footer.tpl +++ b/public/templates/footer.tpl @@ -44,7 +44,7 @@ active_record.innerHTML = "most users ever online was " + data.record + " on " + (new Date(parseInt(data.timestamp,10))).toUTCString() + ""; }); socket.emit('api:user.get', { fields: ['username', 'picture'] }); - socket.on('api:user.get', function(data) { + socket.once('api:user.get', function(data) { if (data.uid > 0) { var gravatar = document.createElement('img'), name = document.createElement('span')