Initial commit, pt. 65

This commit is contained in:
Dmitrii Okunev
2024-08-04 14:13:06 +01:00
parent 74ce1285b8
commit d828ed38c2
34 changed files with 218 additions and 179 deletions

View File

@@ -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)