@@ -90,12 +90,23 @@ func IgnoreRoutines() []goleak.Option {
90
90
"github.com/livepeer/go-livepeer/server.(*LivepeerServer).HandlePush.func1" , "github.com/rjeczalik/notify.(*nonrecursiveTree).dispatch" ,
91
91
"github.com/rjeczalik/notify.(*nonrecursiveTree).internal" , "github.com/livepeer/lpms/stream.NewBasicRTMPVideoStream.func1" , "github.com/patrickmn/go-cache.(*janitor).Run" ,
92
92
"github.com/golang/glog.(*fileSink).flushDaemon" , "github.com/livepeer/go-livepeer/core.(*LivepeerNode).transcodeFrames.func2" , "github.com/ipfs/go-log/writer.(*MirrorWriter).logRoutine" ,
93
- "github.com/livepeer/go-livepeer/core.(*Balances).StartCleanup" ,
93
+ "github.com/livepeer/go-livepeer/core.(*Balances).StartCleanup" , "github.com/livepeer/go-livepeer/server.startTrickleSubscribe.func2" , "github.com/livepeer/go-livepeer/server.startTrickleSubscribe" ,
94
+ "net/http.(*persistConn).writeLoop" , "net/http.(*persistConn).readLoop" , "io.(*pipe).read" ,
95
+ "github.com/livepeer/go-livepeer/media.gatherIncomingTracks" ,
94
96
}
95
97
96
- res := make ([]goleak.Option , 0 , len (funcs2ignore ))
98
+ // Functions that might have other functions on top of their stack (like time.Sleep)
99
+ // These need to be ignored with IgnoreAnyFunction instead of IgnoreTopFunction
100
+ funcsAnyIgnore := []string {
101
+ "github.com/livepeer/go-livepeer/server.ffmpegOutput" ,
102
+ }
103
+
104
+ res := make ([]goleak.Option , 0 , len (funcs2ignore )+ len (funcsAnyIgnore ))
97
105
for _ , f := range funcs2ignore {
98
106
res = append (res , goleak .IgnoreTopFunction (f ))
99
107
}
108
+ for _ , f := range funcsAnyIgnore {
109
+ res = append (res , goleak .IgnoreAnyFunction (f ))
110
+ }
100
111
return res
101
112
}
0 commit comments