mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-18 20:40:54 +02:00
timeout
This commit is contained in:
@@ -305,6 +305,14 @@ func (h *Handler) HandleConn(ctx context.Context, conn net.Conn) error {
|
||||
var finalResult readResult
|
||||
var finalErr error
|
||||
|
||||
// Ensure the done channel is always signaled to clean up timeout goroutine
|
||||
defer func() {
|
||||
select {
|
||||
case done <- true:
|
||||
default:
|
||||
}
|
||||
}()
|
||||
|
||||
// Start a timeout goroutine that will force completion after 1 second
|
||||
go func() {
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user