aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/inet_db.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2019-03-04 13:14:56 +0100
committerRaimo Niskanen <[email protected]>2019-03-04 13:14:56 +0100
commita084f6470369dbad42833e0c6f619ecab092ec09 (patch)
treed783d49ff578242bc3408885332ff88481dc7617 /lib/kernel/src/inet_db.erl
parent069bf45930346e31869362df5e1527d8616f7db1 (diff)
parent7c63a98c28d477f73633e954bc287404d4889680 (diff)
downloadotp-a084f6470369dbad42833e0c6f619ecab092ec09.tar.gz
otp-a084f6470369dbad42833e0c6f619ecab092ec09.tar.bz2
otp-a084f6470369dbad42833e0c6f619ecab092ec09.zip
Merge branch 'inet_db-startup-fix' into maint
* inet_db-startup-fix: Set early enough start time inet_db: fix a bug when .hosts file is never reloaded
Diffstat (limited to 'lib/kernel/src/inet_db.erl')
-rw-r--r--lib/kernel/src/inet_db.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index 6cbb6ac2da..3f5a2ea5ee 100644
--- a/lib/kernel/src/inet_db.erl
+++ b/lib/kernel/src/inet_db.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2016. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2019. 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.
@@ -1223,7 +1223,10 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
{ok, B, _} -> B;
_ -> <<>>
end;
- _ -> <<>>
+ _ ->
+ ets:insert(Db, {TagInfo, undefined}),
+ TimeZero = - (?RES_FILE_UPDATE_TM + 1), % Early enough
+ ets:insert(Db, {TagTm, TimeZero})
end,
handle_set_file(ParseFun, Bin, From, State);
false -> {reply,error,State}