mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
parent
4f1b807064
commit
41fc701009
@ -131,12 +131,16 @@ public class RemoteSessionManagementServiceImpl implements RemoteSessionManageme
|
|||||||
.getMaxMessageBufferSize());
|
.getMaxMessageBufferSize());
|
||||||
session.setMaxIdleTimeout(RemoteSessionManagementDataHolder.getInstance().getMaxIdleTimeout());
|
session.setMaxIdleTimeout(RemoteSessionManagementDataHolder.getInstance().getMaxIdleTimeout());
|
||||||
|
|
||||||
if (token != null && token.isEmpty()) {
|
if (token == null || token.isEmpty()) {
|
||||||
log.error("Could not find a UUID related to the remote session.");
|
String message = "Could not find a UUID related to the remote session.";
|
||||||
|
log.error(message);
|
||||||
|
throw new RemoteSessionManagementException(message);
|
||||||
} else {
|
} else {
|
||||||
String tenantDomain = RemoteSessionManagementDataHolder.getInstance().getUuidToTenantMap().remove(token);
|
String tenantDomain = RemoteSessionManagementDataHolder.getInstance().getUuidToTenantMap().remove(token);
|
||||||
if (tenantDomain == null || tenantDomain.isEmpty()) {
|
if (tenantDomain == null || tenantDomain.isEmpty()) {
|
||||||
log.error("Invalid UUID, could not create the remote session.");
|
String message = "Invalid UUID (" + token + "), could not create the remote session.";
|
||||||
|
log.error(message);
|
||||||
|
throw new RemoteSessionManagementException(message);
|
||||||
} else {
|
} else {
|
||||||
// create new device session
|
// create new device session
|
||||||
initializeDeviceSession(session, tenantDomain, deviceType, deviceId, operationId, token);
|
initializeDeviceSession(session, tenantDomain, deviceType, deviceId, operationId, token);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user