diff options
| author | Mateusz Poliwczak <mpoliwczak34@gmail.com> | 2023-05-11 11:54:28 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-05-11 23:47:00 +0000 |
| commit | 7db6d8a29d1f9bc4265ff4eb77547c7aa5f8c87e (patch) | |
| tree | c1bb73cf5ad0effc5b47a1e7a9c4ebb5da1edcf8 /src/runtime/testdata | |
| parent | 42023d6f529239680773eab5343eedf641e78bb3 (diff) | |
| download | go-7db6d8a29d1f9bc4265ff4eb77547c7aa5f8c87e.tar.xz | |
net: clear /etc/hosts cache on fs.ErrNotExist and fs.ErrPermission errors
This was also the cause of my issues in CL 455275
Before:
root@arch:~/aa# $(time sleep 5 && mv /etc/hosts /tmp/hosts) &
[1] 2214
root@arch:~/aa# go run main.go
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
(....)
After:
root@arch:~/aa# $(time sleep 5 && mv /etc/hosts /tmp/hosts) &
[1] 2284
root@arch:~/aa# go run main.go
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[232.223.232.123] <nil>
[] lookup sth on 127.0.0.53:53: server misbehaving
[] lookup sth on 127.0.0.53:53: server misbehaving
Change-Id: I3090fd8f3105db8c2d7c3bf5afe7b18ebca61cda
GitHub-Last-Rev: cb0dac6448bbc337cd015ad4b4b3d1da3f14a561
GitHub-Pull-Request: golang/go#59963
Reviewed-on: https://go-review.googlesource.com/c/go/+/492555
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime/testdata')
0 files changed, 0 insertions, 0 deletions
