Skip to content

Commit

Permalink
Fix custom SMA-X server use
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Nov 29, 2024
1 parent 131cb9b commit 5fe9883
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/smax-collector.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ int initCollector() {
smaxSetResilient(TRUE);
smaxSetResilientExit(FALSE);

smaxSetServer(getSMAXServerAddress(), 0);

status = smaxConnect();

// Keep trying to connect to SMA-X for up to 1 minute before giving up...
for(i=0; i < CONNECT_ATTEMPTS && status == X_NO_SERVICE; i++) {
status = smaxConnect(getSMAXServerAddress());
status = smaxConnect();
if(status == X_NO_SERVICE) {
if(!warned) {
fprintf(stderr, "Failed to connect to SMA-X. Will keep trying silently...\n");
Expand Down

0 comments on commit 5fe9883

Please sign in to comment.