Skip to content

Commit 426ff46

Browse files
committed
Fix call to client in onConnectionLost
1 parent f14fac3 commit 426ff46

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ClearBlade.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ if (!window.console) {
970970
*</p>
971971
*/
972972
ClearBlade.Messaging = function(options, callback){
973+
var that = this;
973974
//roll through the config
974975
var conf = {};
975976
conf.userName = ClearBlade.appKey;
@@ -982,7 +983,7 @@ if (!window.console) {
982983

983984
var onConnectionLost = function(){
984985
alert("connection lost- attempting to reestablish");
985-
this.client.connect({onSuccess:onConnect, onFailure:onFailure});
986+
that.client.connect({onSuccess:onConnect, onFailure:onFailure});
986987
};
987988

988989
var onMessageArrived = function(message){

0 commit comments

Comments
 (0)