mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
fix context cause propagation
This commit is contained in:
parent
dbbb6f8091
commit
0ae4742dd0
2 changed files with 6 additions and 0 deletions
|
@ -172,6 +172,11 @@ func (h *sshUpstream) Run(ctx context.Context) error {
|
|||
for {
|
||||
conn, err := listener.Accept()
|
||||
if err != nil {
|
||||
// The testenv cleanup expects this function to return a "test cleanup" error,
|
||||
// which propagates via the context.
|
||||
if ctx.Err() != nil {
|
||||
return context.Cause(ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
go h.handleConnection(ctx, conn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue