Commit 3783ba67a4d613cca909b5a49c563008a94db8b3
Committed by
Andrew Shvayka
1 parent
99ccb831
Fix for Defect #394
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -164,7 +164,7 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso |
164 | 164 | } else { |
165 | 165 | logger.debug("[{}] No pending RPC messages for new async session [{}]", deviceId, sessionId); |
166 | 166 | } |
167 | - Set<UUID> sentOneWayIds = new HashSet<>(); | |
167 | + Set<Integer> sentOneWayIds = new HashSet<>(); | |
168 | 168 | if (type == SessionType.ASYNC) { |
169 | 169 | rpcPendingMap.entrySet().forEach(processPendingRpc(context, sessionId, server, sentOneWayIds)); |
170 | 170 | } else { |
... | ... | @@ -174,12 +174,12 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso |
174 | 174 | sentOneWayIds.forEach(rpcPendingMap::remove); |
175 | 175 | } |
176 | 176 | |
177 | - private Consumer<Map.Entry<Integer, ToDeviceRpcRequestMetadata>> processPendingRpc(ActorContext context, SessionId sessionId, Optional<ServerAddress> server, Set<UUID> sentOneWayIds) { | |
177 | + private Consumer<Map.Entry<Integer, ToDeviceRpcRequestMetadata>> processPendingRpc(ActorContext context, SessionId sessionId, Optional<ServerAddress> server, Set<Integer> sentOneWayIds) { | |
178 | 178 | return entry -> { |
179 | 179 | ToDeviceRpcRequest request = entry.getValue().getMsg().getMsg(); |
180 | 180 | ToDeviceRpcRequestBody body = request.getBody(); |
181 | 181 | if (request.isOneway()) { |
182 | - sentOneWayIds.add(request.getId()); | |
182 | + sentOneWayIds.add(entry.getKey()); | |
183 | 183 | ToPluginRpcResponseDeviceMsg responsePluginMsg = toPluginRpcResponseMsg(entry.getValue().getMsg(), (String) null); |
184 | 184 | context.parent().tell(responsePluginMsg, ActorRef.noSender()); |
185 | 185 | } | ... | ... |