@@ -94,8 +94,8 @@ private void login() {
9494
9595 // Random clientId as 16 base64-encoded bytes
9696 String clientId = credentials .getClientId ();
97- String loginRequest = Utils .buildWebsocketJsonRequest (RequestType .LOGIN , clientId );
98-
97+ String loginRequest = Utils .buildWebSocketJsonRequest (RequestType .LOGIN , clientId );
98+
9999 ws .sendText (loginRequest );
100100 }
101101
@@ -105,7 +105,7 @@ private void restoreSession() {
105105 String serverToken = credentials .getServerToken ();
106106 String clientId = credentials .getClientId ();
107107
108- String restoreRequest = Utils .buildWebsocketJsonRequest (RequestType .RESTORE_SESSION ,
108+ String restoreRequest = Utils .buildWebSocketJsonRequest (RequestType .RESTORE_SESSION ,
109109 clientToken , serverToken , clientId );
110110
111111 ws .sendText (restoreRequest );
@@ -127,15 +127,15 @@ private void solveChallenge(String message) {
127127 String serverToken = credentials .getServerToken ();
128128 String clientId = credentials .getClientId ();
129129
130- String challengeRequest = Utils .buildWebsocketJsonRequest (RequestType .SOLVE_CHALLENGE ,
130+ String challengeRequest = Utils .buildWebSocketJsonRequest (RequestType .SOLVE_CHALLENGE ,
131131 signedChallengeBase64 , serverToken , clientId );
132132
133133 ws .sendText (challengeRequest );
134134 }
135135
136136 // QR code expired request a new one
137137 protected void requestNewServerId () {
138- ws .sendText (Utils .buildWebsocketJsonRequest (RequestType .NEW_SERVER_ID , "" ));
138+ ws .sendText (Utils .buildWebSocketJsonRequest (RequestType .NEW_SERVER_ID , "" ));
139139 }
140140
141141 // Gets called after a successful login
@@ -219,14 +219,13 @@ public void onTextMessage(WebSocket websocket, String message) {
219219 if (message .contains ("\" Props\" " ) && !loggedIn ) {
220220 confirmLogin ();
221221 }
222-
223222
224223 String clientId = credentials .getClientId ();
225224
226225 switch (expectedResponse ) {
227226 // Logging in procedure
228227 case ExpectedResponse .LOGIN :
229- // If we can not find any data of a previous session we create a new one
228+ // If we can not find any information of a previous session we create a new one
230229
231230 if (credentials .getClientToken () == null ) {
232231 // Request new qr code
@@ -249,7 +248,7 @@ public void onTextMessage(WebSocket websocket, String message) {
249248 int status = Utils .encodeValidJson (message ).get ("status" ).getAsInt ();
250249
251250 if (status != 200 ) {
252- // A error occurred during authentication
251+ // An error occurred during authentication
253252 // Old session data is invalid so it gets deleted
254253 AuthCredentialsHelper .deletePreviousSession (authCredentialsPath );
255254 disconnect ();
0 commit comments