Reverting signalr disconnection issue to prevent failures on Linux

This commit is contained in:
Mark McDowall 2013-11-13 09:24:51 -08:00
parent fb76fee4a9
commit 47af488e4b
1 changed files with 42 additions and 42 deletions

View File

@ -39,48 +39,48 @@ define(
vent.trigger('server:' + message.name, message.body); vent.trigger('server:' + message.name, message.body);
}); });
this.signalRconnection.reconnecting(function() { // this.signalRconnection.reconnecting(function() {
tryingToReconnect = true; // tryingToReconnect = true;
//
Messenger.show({ // Messenger.show({
id : messengerId, // id : messengerId,
type : 'info', // type : 'info',
hideAfter : 0, // hideAfter : 0,
message : 'Connection to backend lost, attempting to reconnect' // message : 'Connection to backend lost, attempting to reconnect'
}); // });
}); // });
//
this.signalRconnection.reconnected(function() { // this.signalRconnection.reconnected(function() {
tryingToReconnect = false; // tryingToReconnect = false;
//
Messenger.show({ // Messenger.show({
id : messengerId, // id : messengerId,
type : 'success', // type : 'success',
hideAfter : 5, // hideAfter : 5,
message : 'Connection to backend restored' // message : 'Connection to backend restored'
}); // });
}); // });
//
this.signalRconnection.disconnected(function () { // this.signalRconnection.disconnected(function () {
if (tryingToReconnect) { // if (tryingToReconnect) {
$('<div class="modal-backdrop"></div>').appendTo(document.body); // $('<div class="modal-backdrop"></div>').appendTo(document.body);
//
Messenger.show({ // Messenger.show({
id : messengerId, // id : messengerId,
type : 'error', // type : 'error',
hideAfter : 0, // hideAfter : 0,
message : 'Connection to backend lost', // message : 'Connection to backend lost',
actions : { // actions : {
cancel: { // cancel: {
label: 'Reload', // label: 'Reload',
action: function() { // action: function() {
window.location.reload(); // window.location.reload();
} // }
} // }
} // }
}); // });
} // }
}); // });
this.signalRconnection.start({ transport: this.signalRconnection.start({ transport:
[ [