Commit de410d01 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0df9c1fc
......@@ -2120,7 +2120,6 @@ func _main() (err error) {
zurl := flag.Args()[0]
mntpt := flag.Args()[1]
defer xerr.Contextf(&err, "fsserve %s <- %s", mntpt, zurl) // XXX text
xclose := func(c io.Closer) {
err = xerr.First(err, c.Close())
}
......@@ -2130,6 +2129,8 @@ func _main() (err error) {
stdlog.SetFlags(stdlog.Lmicroseconds)
}
log.Infof("start %q %q", mntpt, zurl)
// open zodb storage/watch/db/connection
ctx := context.Background() // XXX + timeout?
zstor, err := zodb.Open(ctx, zurl, &zodb.OpenOptions{
......@@ -2261,6 +2262,8 @@ func _main() (err error) {
// opened, so when all inodes has been forgotten - we know all wcfs.py clients exited)
_ = autoexit
defer xerr.Contextf(&err, "serve %s %s", mntpt, zurl)
// spawn filesystem server.
//
// use `go serve` + `waitMount` not just `serve` - because waitMount
......@@ -2274,7 +2277,7 @@ func _main() (err error) {
}()
err = fssrv.WaitMount()
if err != nil {
return err // XXX err ctx?
return err
}
// filesystem server is serving requests.
......@@ -2290,5 +2293,5 @@ func _main() (err error) {
// wait for unmount
<-serveCtx.Done()
return nil
return nil // XXX serveErr ?
}
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