LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0589-Set-early-enough-start-time.patch of Package erlang (Project home:Ledest:erlang:20)

From 7c63a98c28d477f73633e954bc287404d4889680 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Mon, 4 Mar 2019 13:11:10 +0100
Subject: [PATCH 2/2] Set early enough start time

Adhering to the review in GitHub PR #2066:
The start time should be set so the resolver file can get
re-read as soon as possible to not get the whole timeout time
before detecting that the resolver file has been created.
---
 lib/kernel/src/inet_db.erl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index d87bbb114f..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.
@@ -1224,8 +1224,9 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
 			    _ -> <<>>
 			end;
 		    _ ->
-			ets:insert(Db, {TagTm, times()}),
-			<<>>
+                        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}
-- 
2.16.4