From 7bf2fa4810d2304fdb3225447b7e321929362ed8 Mon Sep 17 00:00:00 2001 From: SwimmingTiger Date: Mon, 13 Jun 2022 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=9F=BF=E6=B1=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=B7=B2=E6=BB=A1=E6=97=B6=E7=AB=8B=E5=8D=B3=E6=96=AD?= =?UTF-8?q?=E5=BC=80=E9=87=8D=E8=BF=9E=EF=BC=8C=E9=98=B2=E6=AD=A2=E4=B8=80?= =?UTF-8?q?=E7=9B=B4=E5=87=BA=E7=8E=B0=E2=80=9Cpool=20server=20is=20full?= =?UTF-8?q?=E2=80=9D=EF=BC=8C=E6=96=B0=E7=9F=BF=E6=9C=BA=E8=BF=9E=E4=B8=8D?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UpSessionBTC.go | 2 +- UpSessionETH.go | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/UpSessionBTC.go b/UpSessionBTC.go index 6838ed3..6fa1ec3 100644 --- a/UpSessionBTC.go +++ b/UpSessionBTC.go @@ -307,7 +307,7 @@ func (up *UpSessionBTC) close() { up.manager.SendEvent(EventUpSessionBroken{up.slot}) } - if up.config.AlwaysKeepDownconn { + if up.stat != StatExit && up.config.AlwaysKeepDownconn { if up.lastJob != nil { up.manager.SendEvent(EventUpdateFakeJobBTC{up.lastJob}) } diff --git a/UpSessionETH.go b/UpSessionETH.go index 956b8ba..914ab16 100644 --- a/UpSessionETH.go +++ b/UpSessionETH.go @@ -295,7 +295,7 @@ func (up *UpSessionETH) close() { up.manager.SendEvent(EventUpSessionBroken{up.slot}) } - if up.config.AlwaysKeepDownconn { + if up.stat != StatExit && up.config.AlwaysKeepDownconn { if up.lastJob != nil { up.manager.SendEvent(EventUpdateFakeJobETH{up.lastJob}) } @@ -702,6 +702,13 @@ func (up *UpSessionETH) handleExMessageSetExtraNonce(ex *ExMessage) { return } + // 矿池服务器满了,无法连接新矿机 + if msg.ExtraNonce == EthereumInvalidExtraNonce { + glog.Error(up.id, "pool server is full, try to reconnect") + up.close() + return + } + down := up.downSessions[msg.SessionID] if down != nil { down.SendEvent(EventSetExtraNonce{msg.ExtraNonce})