Fix double close of abort channel - fixes #592

This commit is contained in:
Nick Craig-Wood 2016-08-18 18:56:57 +01:00
parent b4f2ada820
commit b5faaf7116

View file

@ -183,7 +183,9 @@ func (s *syncCopyMove) processError(err error) {
defer s.errorMu.Unlock()
switch {
case IsFatalError(err):
close(s.abort)
if !s.aborting() {
close(s.abort)
}
s.fatalErr = err
case IsNoRetryError(err):
s.noRetryErr = err