From 69f41dacc99f5520ed2818688948d9a3adeff769 Mon Sep 17 00:00:00 2001 From: Matthew Nibecker Date: Thu, 5 Mar 2020 12:39:46 -0800 Subject: [PATCH] packet post fixes (#389) Follow up to #378. Fixing two bugs that found their way in. --- zqd/packet/packet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zqd/packet/packet.go b/zqd/packet/packet.go index b085dec796..b2bcc59a56 100644 --- a/zqd/packet/packet.go +++ b/zqd/packet/packet.go @@ -72,7 +72,7 @@ func IngestFile(ctx context.Context, s *space.Space, pcap string) (*IngestProces func (p *IngestProcess) run(ctx context.Context) error { idx, err := p.slurp(ctx) if err != nil { - return err + goto abort } if err = p.writeIndexFile(idx); err != nil { goto abort @@ -210,7 +210,7 @@ func (p *IngestProcess) writeData(ctx context.Context) error { // leaking files and file descriptors. bzngfile.Close() os.Remove(bzngfile.Name()) - return nil + return err } if err := bzngfile.Close(); err != nil { return err