lib/volt/page/channel.rb in volt-0.9.1 vs lib/volt/page/channel.rb in volt-0.9.2
- old
+ new
@@ -25,11 +25,11 @@
def connected?
connected
end
def connect!
- %x{
+ `
if (document.location.protocol == 'https:') {
var wsProto = 'wss';
} else {
var wsProto = 'ws';
}
@@ -51,11 +51,11 @@
};
this.socket.onclose = function(error) {
self.$closed(error);
};
- }
+ `
end
def opened
self.status = :open
self.connected = true
@@ -76,10 +76,10 @@
def reconnect!
self.status = :reconnecting
self.reconnect_interval ||= 0
self.reconnect_interval += (1000 + rand(5000))
- self.retry_count += 1
+ self.retry_count += 1
interval = self.reconnect_interval
self.reconnect_in = interval