mirror of https://github.com/ossrs/srs.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
322 B
Go
21 lines
322 B
Go
// Copyright (c) 2024 Winlin
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
|
|
"srs-proxy/logger"
|
|
)
|
|
|
|
func handleGoPprof(ctx context.Context) {
|
|
if addr := envGoPprof(); addr != "" {
|
|
go func() {
|
|
logger.Df(ctx, "Start Go pprof at %v", addr)
|
|
http.ListenAndServe(addr, nil)
|
|
}()
|
|
}
|
|
}
|