Эх сурвалжийг харах

add back mian db commit
26244

Robert 1 жил өмнө
parent
commit
df8046e0e3

+ 11 - 5
EVCB_OCPP.WSServer/Message/CoreProfileHandler.cs

@@ -242,13 +242,19 @@ internal partial class ProfileHandler
                             int.TryParse(configValue, out heartbeat_interval);
                         }
 
-                        session.IsPending = false;
-
-                        var confirm = new BootNotificationConfirmation()
+                        if (session.IsPending == true)
+                        {
+                            session.IsPending = false;
+                        }
+                        if (session.IsPending == null)
                         {
+                            session.IsPending = true;
+                        }
+
+                        var confirm = new BootNotificationConfirmation() { 
                             currentTime = DateTime.UtcNow,
-                            interval = session.IsPending ? 5 : heartbeat_interval,
-                            status = session.IsPending ? RegistrationStatus.Pending : RegistrationStatus.Accepted
+                            interval = session.IsPending.Value ? 5 : heartbeat_interval, 
+                            status = session.IsPending.Value ? RegistrationStatus.Pending : RegistrationStatus.Accepted 
                         };
 
                         result.Message = confirm;

+ 1 - 1
EVCB_OCPP.WSServer/SuperSocket.Protocol/ClientData.cs

@@ -18,7 +18,7 @@ namespace OCPPServer.Protocol
 
         public EVCB_OCPP20.Packet.Messages.Basic.Queue queue20 = new EVCB_OCPP20.Packet.Messages.Basic.Queue();
 
-        public bool IsPending { set; get; } = true;
+        public bool? IsPending { set; get; }
         public bool IsCheckIn { set; get; }
 
         public string ChargeBoxId { set; get; }