Fix attachment processor error handling
This commit is contained in:
parent
16358e82ba
commit
682166d9e3
1 changed files with 4 additions and 1 deletions
|
|
@ -54,6 +54,9 @@ func (ap *AttachmentProcessor) Finish() (*PGPSplitMessage, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ap.done.Wait()
|
ap.done.Wait()
|
||||||
|
if ap.err != nil {
|
||||||
|
return nil, ap.err
|
||||||
|
}
|
||||||
splitMsg := ap.split
|
splitMsg := ap.split
|
||||||
|
|
||||||
if ap.garbageCollector > 0 {
|
if ap.garbageCollector > 0 {
|
||||||
|
|
@ -94,7 +97,7 @@ func (keyRing *KeyRing) newAttachmentProcessor(
|
||||||
Data: ciphertext,
|
Data: ciphertext,
|
||||||
}
|
}
|
||||||
split, splitError := message.SeparateKeyAndData(estimatedSize, garbageCollector)
|
split, splitError := message.SeparateKeyAndData(estimatedSize, garbageCollector)
|
||||||
if attachmentProc.err != nil {
|
if attachmentProc.err == nil {
|
||||||
attachmentProc.err = splitError
|
attachmentProc.err = splitError
|
||||||
}
|
}
|
||||||
attachmentProc.split = split
|
attachmentProc.split = split
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue