Skip to content

Commit f19c692

Browse files
authored
fix bug widh check_auth_response
1 parent 8277cd7 commit f19c692

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/res/dataManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class DataManager
2929
this.asd = new Uint8Array();
3030
this.id = "123";
3131
this.isConnected = false;
32+
this.isSessionStarted = false;
3233
this.dataTmp = new Uint8Array([]);
3334

3435
this.loginClass = null;
@@ -148,13 +149,16 @@ class DataManager
148149
if(this.extraKeys)
149150
this.extraKeys.createExtraKeysHtml();
150151

152+
this.isSessionStarted = true;
151153
this.webSocket.send(KEY_GET_IMAGE);
152154
console.log("KEY_GET_IMAGE sended");
153155
}
154156
else
155157
{
156158
if(this.loginClass)
157159
this.loginClass.showWrongRequest();
160+
161+
this.isSessionStarted = false;
158162
}
159163

160164
}
@@ -164,7 +168,7 @@ class DataManager
164168
var imageHeight = this.uint16FromArray(data.subarray(2,4));
165169
var rectWidth = this.uint16FromArray(data.subarray(4,6));
166170

167-
if(this.displayField)
171+
if(this.displayField && !this.isSessionStarted)
168172
this.displayField.setImageParameters(imageWidth,imageHeight,rectWidth);
169173
}
170174
else if(command === KEY_IMAGE_TILE)

0 commit comments

Comments
 (0)