diff --git a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java index 8352e375f..36744852e 100644 --- a/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java +++ b/components/extensions/cdmf-transport-adapters/output/org.wso2.carbon.device.mgt.output.adapter.websocket/src/main/java/org/wso2/carbon/device/mgt/output/adapter/websocket/authorization/DeviceAuthorizer.java @@ -81,7 +81,7 @@ public class DeviceAuthorizer implements Authorizer { } @Override - public boolean isAuthorized(AuthenticationInfo authenticationInfo, Session session, String stream) { + public synchronized boolean isAuthorized(AuthenticationInfo authenticationInfo, Session session, String stream) { WebSocketSessionRequest webSocketSessionRequest = new WebSocketSessionRequest(session); Map queryParams = webSocketSessionRequest.getQueryParamValuePairs(); String deviceId = queryParams.get(DEVICE_ID);