Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue that connectivity_manager was only initialized in a single constructor #771

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/ocpp/v201/charge_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ ChargePoint::ChargePoint(const std::map<int32_t, int32_t>& evse_connector_struct

initialize(evse_connector_structure, message_log_path);

this->connectivity_manager =
std::make_unique<ConnectivityManager>(*this->device_model, this->evse_security, this->logging,
std::bind(&ChargePoint::message_callback, this, std::placeholders::_1));

this->connectivity_manager->set_websocket_connected_callback(
std::bind(&ChargePoint::websocket_connected_callback, this, std::placeholders::_1));
this->connectivity_manager->set_websocket_disconnected_callback(
Expand Down Expand Up @@ -1015,6 +1011,10 @@ void ChargePoint::initialize(const std::map<int32_t, int32_t>& evse_connector_st
this->monitoring_updater.start_monitoring();

this->auth_cache_cleanup_thread = std::thread(&ChargePoint::cache_cleanup_handler, this);

this->connectivity_manager =
std::make_unique<ConnectivityManager>(*this->device_model, this->evse_security, this->logging,
std::bind(&ChargePoint::message_callback, this, std::placeholders::_1));
}

void ChargePoint::init_certificate_expiration_check_timers() {
Expand Down
Loading