diff options
author | Jordan <me@jordan.im> | 2022-03-24 12:54:18 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-03-24 12:54:18 -0700 |
commit | c089f8a62c0da541b41bde6a0d7f9faa42859ee6 (patch) | |
tree | 6997b066d17164624c26067f71128b0bc21440a3 | |
parent | 5fe5bcb9360f77367164e7c96314961cac15ae9f (diff) | |
download | crawl-c089f8a62c0da541b41bde6a0d7f9faa42859ee6.tar.gz crawl-c089f8a62c0da541b41bde6a0d7f9faa42859ee6.zip |
crawler: close temporary descriptor in advance of defer (performance)
-rw-r--r-- | crawler.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -266,6 +266,7 @@ func (c *Crawler) urlHandler(queue <-chan queuePair) { if httpErr == nil { httpResp.Body.Close() // nolint } + tmpFile.Close() os.Remove(tmpFile.Name()) wb := new(leveldb.Batch) |