提交 93ad2bd0 作者: Juan Batiz-Benet

mount: if already mounted, unmount before new attempt

This is because if the user specifies that they want
to mount multiple times, something must be wrong. try
unmounting to reset things and then proceed.
上级 705465db
...@@ -98,6 +98,16 @@ baz ...@@ -98,6 +98,16 @@ baz
return nil, err return nil, err
} }
// check if we already have live mounts.
// if the user said "Mount", then there must be something wrong.
// so, close them and try again.
if node.Mounts.Ipfs != nil {
node.Mounts.Ipfs.Unmount()
}
if node.Mounts.Ipns != nil {
node.Mounts.Ipns.Unmount()
}
// error if we aren't running node in online mode // error if we aren't running node in online mode
if node.Network == nil { if node.Network == nil {
return nil, errNotOnline return nil, errNotOnline
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论