mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-03 22:33:28 +00:00
reverseproxy: make error chan bigger when reverse proxying websocket (#7419)
This commit is contained in:
parent
7b031e1eb5
commit
80f2ae92cd
1 changed files with 4 additions and 1 deletions
|
|
@ -214,7 +214,10 @@ func (h *Handler) handleUpgradeResponse(logger *zap.Logger, wg *sync.WaitGroup,
|
|||
timeoutc = timer.C
|
||||
}
|
||||
|
||||
errc := make(chan error, 1)
|
||||
// when a stream timeout is encountered, no error will be read from errc
|
||||
// a buffer size of 2 will allow both the read and write goroutines to send the error and exit
|
||||
// see: https://github.com/caddyserver/caddy/issues/7418
|
||||
errc := make(chan error, 2)
|
||||
wg.Add(2)
|
||||
go spc.copyToBackend(errc)
|
||||
go spc.copyFromBackend(errc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue