lib/js/cometio.js in sinatra-cometio-0.0.2 vs lib/js/cometio.js in sinatra-cometio-0.0.3
- old
+ new
@@ -9,10 +9,11 @@
url : self.url,
data : {type : type, data : data, session : self.session},
success : function(data){
},
error : function(req, stat, e){
+ self.emit("error", "CometIO push error");
},
complete : function(e){
},
type : "POST",
dataType : "json",
@@ -40,9 +41,10 @@
self.emit(data.type, data.data);
}
self.get();
},
error : function(req, stat, e){
+ self.emit("error", "CometIO get error");
setTimeout(self.get, 10000);
},
complete : function(e){
},
type : "GET",