mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-13 03:03:44 +08:00
Initial commit, pt. 65
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/xaionaro-go/streamctl/pkg/observability"
|
||||
)
|
||||
|
||||
type OAuthHandlerArgument struct {
|
||||
@@ -74,12 +76,12 @@ func NewCodeReceiver(
|
||||
}),
|
||||
}
|
||||
|
||||
go func() {
|
||||
observability.Go(ctx, func() {
|
||||
<-ctx.Done()
|
||||
listener.Close()
|
||||
srv.Close()
|
||||
close(codeCh)
|
||||
}()
|
||||
})
|
||||
|
||||
go srv.Serve(listener)
|
||||
|
||||
|
Reference in New Issue
Block a user