Don't show socket error message when the server dies

This commit is contained in:
calzoneman 2013-08-19 11:10:52 -05:00
parent 49dc501a8e
commit 779bdb4067
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
Callbacks = { Callbacks = {
error: function (reason) { error: function (reason) {
// Don't show the error for when the server goes down
if(reason && reason.returnValue === true)
return;
var d = $("<div/>").addClass("alert alert-error span12") var d = $("<div/>").addClass("alert alert-error span12")
.appendTo($("#announcements")); .appendTo($("#announcements"));
$("<h3/>").text("Uh-oh!").appendTo(d); $("<h3/>").text("Uh-oh!").appendTo(d);