diff options
author | Erlang/OTP <otp@erlang.org> | 2020-08-17 15:24:21 +0200 |
---|---|---|
committer | Erlang/OTP <otp@erlang.org> | 2020-08-17 15:24:21 +0200 |
commit | a7ba6b5b38e3cb4a0a1c5bbb87ab54996988c637 (patch) | |
tree | 66117679aedd62ae700a32dacefbfd6ced5b123d | |
parent | 7339e8f745c9ae4cc71e8dc09be37e3116249392 (diff) | |
parent | 2a3b7f1fa271c5d9d6028add1fc7ae0e70133aec (diff) | |
download | erlang-a7ba6b5b38e3cb4a0a1c5bbb87ab54996988c637.tar.gz |
Merge branch 'raimo/snmp/active-once-after-timeout/ERIERL-523/OTP-15767' into maint-22
* raimo/snmp/active-once-after-timeout/ERIERL-523/OTP-15767:
Always renew active,once after a discovery response
-rw-r--r-- | lib/snmp/src/agent/snmpa_net_if.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl index c1f7c6b424..4ecf833963 100644 --- a/lib/snmp/src/agent/snmpa_net_if.erl +++ b/lib/snmp/src/agent/snmpa_net_if.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2019. All Rights Reserved. +%% Copyright Ericsson AB 2004-2020. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -729,9 +729,9 @@ handle_discovery_response( _From, #pdu{request_id = ReqId} = Pdu, ManagerEngineId) -> + active_once(Socket), case lists:keyfind(ReqId, 1, S#state.reqs) of {ReqId, Pid} -> - active_once(Socket), Pid ! {snmp_discovery_response_received, Pdu, ManagerEngineId}, %% XXX Strange... Reqs from this Pid should be reaped %% at process exit by clear_reqs/2 so the following @@ -748,7 +748,6 @@ handle_discovery_response( case (length(DiscoReqs) =:= 2) of true -> [{_, Pid}, _] = DiscoReqs, - active_once(Socket), Pid ! {snmp_discovery_response_received, Pdu, ManagerEngineId}, NReqs = S#state.reqs -- DiscoReqs, |