SplitHTTP: Fix connection leaks and crashes (#3710)

This commit is contained in:
mmmray
2024-08-22 17:07:57 +02:00
committed by GitHub
parent 2be03c56cb
commit 83eef6bc1f
7 changed files with 109 additions and 65 deletions

View File

@@ -51,8 +51,10 @@ func (h *uploadQueue) Close() error {
h.writeCloseMutex.Lock()
defer h.writeCloseMutex.Unlock()
h.closed = true
close(h.pushedPackets)
if !h.closed {
h.closed = true
close(h.pushedPackets)
}
return nil
}