Wait 20s for worker shutdown so the miner can unregister the worker
This commit is contained in:
parent
9d65b56d2e
commit
5f0ac7defb
@ -647,6 +647,8 @@ var runCmd = &cli.Command{
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
<-workerApi.Done()
|
<-workerApi.Done()
|
||||||
|
// Wait 20s to allow the miner to unregister the worker on next heartbeat
|
||||||
|
time.Sleep(20 * time.Second)
|
||||||
log.Warn("Shutting down...")
|
log.Warn("Shutting down...")
|
||||||
if err := srv.Shutdown(context.TODO()); err != nil {
|
if err := srv.Shutdown(context.TODO()); err != nil {
|
||||||
log.Errorf("shutting down RPC server failed: %s", err)
|
log.Errorf("shutting down RPC server failed: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user