feat: start media server with no db right after logout (#3505)
This commit is contained in:
parent
6fed50ce53
commit
23138d0dbb
|
@ -633,6 +633,7 @@ func TestLoginWithKey(t *testing.T) {
|
|||
require.NoError(t, b.AccountManager().InitKeystore(conf.KeyStoreDir))
|
||||
b.UpdateRootDataDir(conf.DataDir)
|
||||
require.NoError(t, b.OpenAccounts())
|
||||
require.NotNil(t, b.statusNode.HTTPServer())
|
||||
|
||||
address := crypto.PubkeyToAddress(walletKey.PublicKey)
|
||||
require.NoError(t, b.SaveAccountAndStartNodeWithKey(main, "test-pass", testSettings, conf, []*accounts.Account{{Address: address, Wallet: true}}, keyhex))
|
||||
|
@ -1063,6 +1064,7 @@ func login(t *testing.T, conf *params.NodeConfig) {
|
|||
|
||||
wg.Wait()
|
||||
require.NoError(t, b.Logout())
|
||||
require.NotNil(t, b.statusNode.HTTPServer())
|
||||
require.NoError(t, b.StopNode())
|
||||
|
||||
}
|
||||
|
|
|
@ -1596,6 +1596,12 @@ func (b *GethStatusBackend) Logout() error {
|
|||
}
|
||||
// re-initialize the node, at some point we should better manage the lifecycle
|
||||
b.initialize()
|
||||
|
||||
err = b.statusNode.StartMediaServerWithoutDB()
|
||||
if err != nil {
|
||||
b.log.Error("failed to start media server without app db", "err", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue