aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorMaxim Fedorov <[email protected]>2018-12-19 18:21:11 -0800
committerMaxim Fedorov <[email protected]>2018-12-19 18:21:11 -0800
commitfe0ed97c5f46842c279eda95d1332f4ed2ea3e0d (patch)
tree66181678410a455121fa4a18b8969712c5cbc2db /lib/kernel/src
parent3825199794da28d79b21052a2e69e2335921d55e (diff)
downloadotp-fe0ed97c5f46842c279eda95d1332f4ed2ea3e0d.tar.gz
otp-fe0ed97c5f46842c279eda95d1332f4ed2ea3e0d.tar.bz2
otp-fe0ed97c5f46842c279eda95d1332f4ed2ea3e0d.zip
inet_db: fix a bug when .hosts file is never reloaded
If .hosts file does not exist when kernel application starts, it will never get reloaded.
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/inet_db.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index 6cbb6ac2da..d87bbb114f 100644
--- a/lib/kernel/src/inet_db.erl
+++ b/lib/kernel/src/inet_db.erl
@@ -1223,7 +1223,9 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
{ok, B, _} -> B;
_ -> <<>>
end;
- _ -> <<>>
+ _ ->
+ ets:insert(Db, {TagTm, times()}),
+ <<>>
end,
handle_set_file(ParseFun, Bin, From, State);
false -> {reply,error,State}