File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ Messaging = (function (global) {
82
82
// Private variables below, these are only visible inside the function closure
83
83
// which is used to define the module.
84
84
85
- var version = "0.0.0.0 " ;
85
+ var version = "@VERSION@ " ;
86
86
var buildLevel = "@BUILDLEVEL@" ;
87
87
88
88
/**
@@ -1088,7 +1088,8 @@ Messaging = (function (global) {
1088
1088
}
1089
1089
this . _trace ( "Client._on_socket_message" , wireMessage ) ;
1090
1090
1091
- switch ( wireMessage . type ) {
1091
+ try {
1092
+ switch ( wireMessage . type ) {
1092
1093
case MESSAGE_TYPE . CONNACK :
1093
1094
this . _connectTimeout . cancel ( ) ;
1094
1095
@@ -1231,7 +1232,11 @@ Messaging = (function (global) {
1231
1232
1232
1233
default :
1233
1234
this . _disconnected ( ERROR . INVALID_MQTT_MESSAGE_TYPE . code , format ( ERROR . INVALID_MQTT_MESSAGE_TYPE , [ wireMessage . type ] ) ) ;
1234
- } ;
1235
+ } ;
1236
+ } catch ( error ) {
1237
+ this . _disconnected ( ERROR . INTERNAL_ERROR . code , format ( ERROR . INTERNAL_ERROR , [ error . message ] ) ) ;
1238
+ return ;
1239
+ }
1235
1240
} ;
1236
1241
1237
1242
/** @ignore */
You can’t perform that action at this time.
0 commit comments