2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 21:05:10 +00:00
restic/internal/backend/b2
George Armhold 3304b0fcf0 prevent deadlock in List() for B2 when b2.connections=1
This is a fix for the following situation (gh-1188):

List() grabs a semaphore token upon entry, starts a goroutine, and
does not release the token until the routine exits (via a defer).

The goroutine iterates over the results from ListCurrentObjects(),
sending them one at a time to a channel, where they are ultimately
processed by be.Load().

Since be.Load() also needs a token, this will result in deadlock if
b2.connections=1.

This fix changes List() so that the token is only held during the call
to ListCurrentObjects().
2017-10-28 18:46:47 -04:00
..
b2_test.go Remove Deleter interface 2017-10-14 16:04:29 +02:00
b2.go prevent deadlock in List() for B2 when b2.connections=1 2017-10-28 18:46:47 -04:00
config_test.go Moves files 2017-07-23 14:19:13 +02:00
config.go Run goimports 2017-07-23 14:21:03 +02:00