Skip to content

Commit 4b42e84

Browse files
committed
Merge branch 'main' into feature/ocpp2.1-public-draft-messages
2 parents ef17bfe + 055caef commit 4b42e84

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/ocpp/v16/charge_point_impl.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -4225,8 +4225,12 @@ void ChargePointImpl::on_transaction_stopped(const int32_t connector, const std:
42254225
const auto stop_energy_wh = std::make_shared<StampedEnergyWh>(timestamp, energy_wh_import);
42264226
transaction->add_stop_energy_wh(stop_energy_wh);
42274227

4228-
this->status->submit_event(connector, FSMEvent::TransactionStoppedAndUserActionRequired, ocpp::DateTime());
42294228
this->stop_transaction(connector, reason, id_tag_end);
4229+
4230+
if (reason != Reason::EVDisconnected) {
4231+
this->status->submit_event(connector, FSMEvent::TransactionStoppedAndUserActionRequired, ocpp::DateTime());
4232+
}
4233+
42304234
this->transaction_handler->remove_active_transaction(connector);
42314235
this->connectors.at(connector)->transaction = nullptr;
42324236

0 commit comments

Comments
 (0)