cancel on exit
Brian Tiger Chow committed
Dec 24, 2014 at 09:26 UTC
d619e4ada9b88eddc916fa1d44c29e548a731284
1 file changed
+2
-1
epictest/addcat_test.go
+2
-1
@@ -89,7 +89,8 @@ func RandomBytes(n int64) []byte {
89
}
90
91
func AddCatBytes(data []byte, conf Config) error {
92
- ctx := context.Background()
92
+ ctx, cancel := context.WithCancel(context.Background())
93
+ defer cancel()
94
mn := mocknet.New(ctx)
95
// defer mn.Close() FIXME does mocknet require clean-up
96
mn.SetLinkDefaults(mocknet.LinkOptions{