mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 15:46:58 +08:00
add parameter pprofPort to configure the port of the pprof listener
This commit is contained in:
4
main.go
4
main.go
@@ -183,6 +183,7 @@ func (p *program) createResources(initial bool) error {
|
||||
if p.pprof == nil {
|
||||
p.pprof, err = pprof.New(
|
||||
p.conf.ListenIP,
|
||||
p.conf.PprofPort,
|
||||
p)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -303,7 +304,8 @@ func (p *program) closeResources(newConf *conf.Conf) {
|
||||
closePprof := false
|
||||
if newConf == nil ||
|
||||
newConf.Pprof != p.conf.Pprof ||
|
||||
newConf.ListenIP != p.conf.ListenIP {
|
||||
newConf.ListenIP != p.conf.ListenIP ||
|
||||
newConf.PprofPort != p.conf.PprofPort {
|
||||
closePprof = true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user