Skip to content

Commit

Permalink
stratumserver: Boot clients sending non-ASCII data (or unsupported TL…
Browse files Browse the repository at this point in the history
…S attempts)
  • Loading branch information
luke-jr committed Jun 23, 2015
1 parent 3c2d205 commit aeb0448
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stratumserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ def sendReply(self, ob):
return self.push(json.dumps(ob).encode('ascii') + b"\n")

def found_terminator(self):
inbuf = b"".join(self.incoming).decode('ascii')
try:
inbuf = b"".join(self.incoming).decode('ascii')
except:
self.boot()
return
self.incoming = []

if not inbuf:
Expand Down

0 comments on commit aeb0448

Please sign in to comment.