8000 Fix exception on Ctrl-C · coderlv/stratum-mining-proxy@cefa1df · GitHub
[go: up one dir, main page]

Skip to content

Commit cefa1df

Browse files
committed
Fix exception on Ctrl-C
1 parent 7b5c080 commit cefa1df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mining_libs/stratum_listener.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class MiningSubscription(Subscription):
4141
@classmethod
4242
def disconnect_all(cls):
4343
for subs in Pubsub.iterate_subscribers(cls.event):
44-
subs.connection_ref().transport.loseConnection()
44+
if subs.connection_ref().transport != None:
45+
subs.connection_ref().transport.loseConnection()
4546

4647
@classmethod
4748
def on_template(cls, job_id, prevhash, coinb1, coinb2, merkle_branch, version, nbits, ntime, clean_jobs):

0 commit comments

Comments
 (0)
0