-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes upgraded connection on copy completion (#1670)
Proxy copies data via `io.Copy` between upgraded request and backend connections in two goroutines and waits for both copy calls to complete: ``` wait { copy backend to request // 1 copy request to backend // 2 } ``` When backend connection is closed, first copy call completes but the second is still blocked on read from request connection until it is closed (i.e. client disconnects). This change waits for either copy to complete and closes both request and backend connections and thus unblocks the second copy. Fixes #1669 Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information
1 parent
657ad4e
commit f5f2314
Showing
2 changed files
with
50 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters