diff --git a/src/MicroOcpp/Model/ConnectorBase/Connector.cpp b/src/MicroOcpp/Model/ConnectorBase/Connector.cpp index 11142dc9..46f9fd25 100644 --- a/src/MicroOcpp/Model/ConnectorBase/Connector.cpp +++ b/src/MicroOcpp/Model/ConnectorBase/Connector.cpp @@ -1184,6 +1184,7 @@ std::unique_ptr Connector::fetchFrontRequest() { transactionFront->commit(); auto startTx = makeRequest(new Ocpp16::StartTransaction(model, transactionFront)); + startTx->setTimeout((unsigned long)std::max(1, transactionMessageRetryIntervalInt->getInt()) * 1000UL); startTx->setOnReceiveConfListener([this] (JsonObject response) { //fetch authorization status from StartTransaction.conf() for user notification @@ -1253,6 +1254,7 @@ std::unique_ptr Connector::fetchFrontRequest() { } else { stopTx = makeRequest(new Ocpp16::StopTransaction(model, transactionFront)); } + stopTx->setTimeout((unsigned long)std::max(1, transactionMessageRetryIntervalInt->getInt()) * 1000UL); auto transactionFront_capture = transactionFront; stopTx->setOnAbortListener([this, transactionFront_capture] () { //shortcut to the attemptNr check above. Relevant if other operations block the queue while this StopTx is timing out diff --git a/src/MicroOcpp/Model/Metering/MeteringConnector.cpp b/src/MicroOcpp/Model/Metering/MeteringConnector.cpp index 378232a5..c58c2548 100644 --- a/src/MicroOcpp/Model/Metering/MeteringConnector.cpp +++ b/src/MicroOcpp/Model/Metering/MeteringConnector.cpp @@ -294,6 +294,7 @@ std::unique_ptr MeteringConnector::fetchFrontRequest() { } auto meterValues = makeRequest(new MeterValues(model, meterDataFront.get(), connectorId, tx)); + meterValues->setTimeout((unsigned long)std::max(1, transactionMessageRetryIntervalInt->getInt()) * 1000UL); meterValues->setOnReceiveConfListener([this] (JsonObject) { //operation success MO_DBG_DEBUG("drop MV front");