SplitHTTP: Fix connection leaks and crashes (#3710)

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

No files matched your search

+4 -2
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
}