Skip to content

Commit

Permalink
fix bug widh check_auth_response
Browse files Browse the repository at this point in the history
  • Loading branch information
agafon0ff authored Jul 22, 2020
1 parent 8277cd7 commit f19c692
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/res/dataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class DataManager
this.asd = new Uint8Array();
this.id = "123";
this.isConnected = false;
this.isSessionStarted = false;
this.dataTmp = new Uint8Array([]);

this.loginClass = null;
Expand Down Expand Up @@ -148,13 +149,16 @@ class DataManager
if(this.extraKeys)
this.extraKeys.createExtraKeysHtml();

this.isSessionStarted = true;
this.webSocket.send(KEY_GET_IMAGE);
console.log("KEY_GET_IMAGE sended");
}
else
{
if(this.loginClass)
this.loginClass.showWrongRequest();

this.isSessionStarted = false;
}

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

if(this.displayField)
if(this.displayField && !this.isSessionStarted)
this.displayField.setImageParameters(imageWidth,imageHeight,rectWidth);
}
else if(command === KEY_IMAGE_TILE)
Expand Down

0 comments on commit f19c692

Please sign in to comment.