Commit d619e4ad authored by Brian Tiger Chow's avatar Brian Tiger Chow

cancel on exit

parent 35f6ddb8
...@@ -89,7 +89,8 @@ func RandomBytes(n int64) []byte { ...@@ -89,7 +89,8 @@ func RandomBytes(n int64) []byte {
} }
func AddCatBytes(data []byte, conf Config) error { func AddCatBytes(data []byte, conf Config) error {
ctx := context.Background() ctx, cancel := context.WithCancel(context.Background())
defer cancel()
mn := mocknet.New(ctx) mn := mocknet.New(ctx)
// defer mn.Close() FIXME does mocknet require clean-up // defer mn.Close() FIXME does mocknet require clean-up
mn.SetLinkDefaults(mocknet.LinkOptions{ mn.SetLinkDefaults(mocknet.LinkOptions{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment