snmp: changed termination order causing error due to new logging

This commit is contained in:
Olof hagsand 2024-02-22 14:17:36 +01:00
parent 01938b7a64
commit c5b852f6b1

View file

@ -583,8 +583,8 @@ main(int argc,
ok: ok:
retval = 0; retval = 0;
done: done:
snmp_terminate(h);
clixon_log_init(h, __PROGRAM__, LOG_INFO, 0); /* Log on syslog no stderr */ clixon_log_init(h, __PROGRAM__, LOG_INFO, 0); /* Log on syslog no stderr */
clixon_log(h, LOG_NOTICE, "%s: %u Terminated", __PROGRAM__, getpid()); clixon_log(h, LOG_NOTICE, "%s: %u Terminated", __PROGRAM__, getpid());
snmp_terminate(h);
return retval; return retval;
} }