containerd/core/remotes/docker
Justin Chadwell b48e1141eb copy: setError should imply Close
If sending two messages from goroutine X:

	a <- 1
	b <- 2

And receiving them in goroutine Y:

	select {
	case <- a:
	case <- b:
	}

Either branch of the select can trigger first - so when we call
.setError and .Close next to each other, we don't know whether the done
channel will close first or the error channel will receive first - so
sometimes, we get an incorrect error message.

We resolve this by not sending both signals - instead, we can have
.setError *imply* .Close, by having the pushWriter call .Close on
itself, after receiving an error.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:11 +01:00
..
auth remotes/docker/authorizer.go: invalidate auth tokens when they expire. 2024-01-23 09:58:57 -08:00
config Switch to new errdefs package 2024-01-25 22:18:45 -08:00
schema1 Switch to new errdefs package 2024-01-25 22:18:45 -08:00
authorizer.go Merge pull request #8735 from iain-macdonald/iain-macdonald/issue-6377 2024-01-29 16:18:56 +00:00
converter_fuzz.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
converter.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
errcode.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
errdesc.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
fetcher_fuzz.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
fetcher_test.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
fetcher.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00
handler_test.go Move reference to pkg/reference 2024-01-17 09:55:58 -08:00
handler.go Move reference to pkg/reference 2024-01-17 09:55:58 -08:00
httpreadseeker.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00
pusher_test.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00
pusher.go copy: setError should imply Close 2024-02-03 10:20:11 +01:00
registry_test.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
registry.go Move remotes to core/remotes 2024-01-17 09:52:21 -08:00
resolver_test.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00
resolver.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00
scope_test.go Move reference to pkg/reference 2024-01-17 09:55:58 -08:00
scope.go Move reference to pkg/reference 2024-01-17 09:55:58 -08:00
status.go Switch to new errdefs package 2024-01-25 22:18:45 -08:00