|
@@ -201,9 +201,20 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
int.TryParse(configVaule, out heartbeat_interval);
|
|
|
}
|
|
|
}
|
|
|
- var confirm = new BootNotificationConfirmation() { currentTime = DateTime.UtcNow, interval = session.IsPending ? heartbeat_interval : 5, status = session.IsPending ? Packet.Messages.SubTypes.RegistrationStatus.Accepted : RegistrationStatus.Pending };
|
|
|
+ if (session.IsPending == true)
|
|
|
+ {
|
|
|
+ session.IsPending = false;
|
|
|
+ }
|
|
|
+ if (session.IsPending == null)
|
|
|
+ {
|
|
|
+ session.IsPending = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ var confirm = new BootNotificationConfirmation() { currentTime = DateTime.UtcNow, interval = session.IsPending.Value ? 5:heartbeat_interval , status = session.IsPending.Value ?RegistrationStatus.Pending : RegistrationStatus.Accepted };
|
|
|
+
|
|
|
|
|
|
- session.IsPending = !session.IsPending;
|
|
|
+
|
|
|
+
|
|
|
result.Message = confirm;
|
|
|
result.Success = true;
|
|
|
}
|