mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-08 21:58:07 -05:00
fix: handle RPC server panic if port is in use (#418)
This commit is contained in:
@@ -70,6 +70,9 @@ func RunBootnode(ctx context.Context, cfg *Config) error {
|
||||
},
|
||||
IsBootnodeOnly: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Infof("starting bootnode with data-dir %s", cfg.DataDir)
|
||||
err = rpcServer.Start()
|
||||
|
||||
@@ -157,6 +157,9 @@ func RunSwapDaemon(ctx context.Context, conf *SwapdConfig) (err error) {
|
||||
RecoveryDB: sdb.RecoveryDB(),
|
||||
Namespaces: rpc.AllNamespaces(),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Infof("starting swapd with data-dir %s", conf.EnvConf.DataDir)
|
||||
err = rpcServer.Start()
|
||||
|
||||
Reference in New Issue
Block a user