mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 09:52:20 +08:00
fix panic caused by accessing config after repo closed
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
@ -204,7 +204,13 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
|
||||
return
|
||||
}
|
||||
if routingOption == routingOptionSupernodeKwd {
|
||||
servers, err := repo.Config().SupernodeRouting.ServerIPFSAddrs()
|
||||
rcfg, err := repo.Config()
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
return
|
||||
}
|
||||
|
||||
servers, err := rcfg.SupernodeRouting.ServerIPFSAddrs()
|
||||
if err != nil {
|
||||
res.SetError(err, cmds.ErrNormal)
|
||||
repo.Close() // because ownership hasn't been transferred to the node
|
||||
|
Reference in New Issue
Block a user