Skip to content

Commit

Permalink
reauthTime check (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
pisuke authored Aug 10, 2022
1 parent 3d390b9 commit 4a9118b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pubber/src/main/java/daq/pubber/MqttPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private void sendMessage(String deviceId, String mqttTopic,
private void checkAuthentication(String deviceId) {
String authId = isProxyDevice(deviceId) ? configuration.gatewayId : deviceId;
Instant reauthTime = reauthTimes.get(authId);
if (reauthTime != null && Instant.now().isBefore(reauthTime)) {
if (reauthTime == null || (reauthTime != null && Instant.now().isBefore(reauthTime))) {
return;
}
warn("Authentication retry time reached for " + authId);
Expand Down

0 comments on commit 4a9118b

Please sign in to comment.