Skip to content

Commit

Permalink
FOGL-9070: change connection retry timings
Browse files Browse the repository at this point in the history
 Connection retry timings are not set to min 20 seconds and 5 minutes maximum

The dnp3 library uses an algo that reduces the rate or connection retry.

Logged error messages will change accordingly.

Prevous set, Default() was 1 second and 1 minute
  • Loading branch information
pintomax committed Sep 6, 2024
1 parent 16cedb5 commit 6200fa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dnp3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ bool DNP3::start()
{
string remoteLabel = "remote_" + to_string(outstation->linkId);

// Connection retry timings: staring with 20 seconds, then up to 5 minutes
auto retry = ChannelRetry(TimeDuration::Seconds(20), TimeDuration::Minutes(5));

// Create TCP channel for outstation
std::shared_ptr<IChannel> channel =
manager->AddTCPClient(m_serviceName + "_" + remoteLabel, // alias in log messages
logLevels, // filter what gets logged
ChannelRetry::Default(), // how connections will be retried
auto, // how connections will be retried
// host names or IP address of remote endpoint
outstation->address,
// interface adapter on which to attempt the connection (any adapter)
Expand Down

0 comments on commit 6200fa5

Please sign in to comment.