File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
core/src/main/java/xyz/gianlu/librespot/core Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -221,8 +221,8 @@ public void closeSession() throws IOException {
221
221
connectionTime = 0 ;
222
222
}
223
223
224
- private boolean hasActiveSession () {
225
- boolean valid = session != null && session .isValid () && session . isActive () ;
224
+ private boolean hasValidSession () {
225
+ boolean valid = session != null && session .isValid ();
226
226
if (!valid ) {
227
227
session = null ;
228
228
connectionTime = 0 ;
@@ -231,9 +231,13 @@ private boolean hasActiveSession() {
231
231
return valid ;
232
232
}
233
233
234
+ private boolean hasActiveSession () {
235
+ return hasValidSession () && session .isActive ();
236
+ }
237
+
234
238
private void handleGetInfo (OutputStream out , String httpVersion ) throws IOException {
235
239
JsonObject info = DEFAULT_GET_INFO_FIELDS .deepCopy ();
236
- info .addProperty ("activeUser" , hasActiveSession () ? session .username () : "" );
240
+ info .addProperty ("activeUser" , hasValidSession () ? session .username () : "" );
237
241
info .addProperty ("deviceID" , inner .deviceId );
238
242
info .addProperty ("remoteName" , inner .deviceName );
239
243
info .addProperty ("publicKey" , Base64 .getEncoder ().encodeToString (keys .publicKeyArray ()));
You can’t perform that action at this time.
0 commit comments