﻿(function (app, $, ko, toast, moment) {
    app.events = app.events || function () {
        $.connection.hub.start();

        return {
            on: function (event, callback) {
                $.connection.eventsHub.on(event, callback);
            },
            off: function (event, callback) {
                $.connection.eventsHub.off(event, callback);
            }
        }
    }();

}(window.pourcast = window.pourcast || {}, jQuery, ko, toastr, moment));
@@ -15,31 +15,12 @@
 p, $
-, ko, toast, moment
 ) %7B%0A
+
     
@@ -95,16 +95,399 @@
 art();%0A%0A
+        var timeout = 0;%0A%0A        // try reconnect if disconnected%0A        $.connection.eventsHub.disconnected(function() %7B%0A            setTimeout(function () %7B%0A                $.connection.eventsHub.start();%0A                timeout++;%0A            %7D, Math.pow(2, timeout) * 1000);%0A        %7D);%0A%0A        $.connection.hub.reconnected(function () %7B%0A            timeout = 0;%0A        %7D);%0A%0A
         
@@ -756,16 +756,16 @@
   %7D();%0A%0A
+
 %7D(window
@@ -809,27 +809,7 @@
 uery
-, ko, toastr, moment
 ));

Add signalr reconnect logic