Commit 7d81b8dc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 58786531
......@@ -108,7 +108,12 @@ func storageMain(argv []string) {
if err != nil {
return err
}
// XXX back.Close here or in Storage?
defer func() {
if back != nil {
__ := back.Close()
err = xerr.First(err, __)
}
}()
net, err := netSetup(ctx)
if err != nil {
......@@ -121,6 +126,7 @@ func storageMain(argv []string) {
return listenAndServe(ctx, net, *bind, func(ctx context.Context, l xnet.Listener) error {
stor := neo.NewStorage(*cluster, master, net, back)
back = nil
return stor.Run(ctx, l)
})
}()
......
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