X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=transports%2Fstratum_tcp.py;fp=transports%2Fstratum_tcp.py;h=6ae2940f8aba12f175d7e295f52c49fa623811b7;hp=a1ac042842838032307c01281b8f787a150c5d62;hb=7ff0c0c3850066a935e272f2ddd11422d0871042;hpb=a4a11fca8d0b078c429d9ff369de1bd1fed334a3 diff --git a/transports/stratum_tcp.py b/transports/stratum_tcp.py index a1ac042..6ae2940 100644 --- a/transports/stratum_tcp.py +++ b/transports/stratum_tcp.py @@ -144,6 +144,8 @@ class TcpClientRequestor(threading.Thread): self.dispatcher.push_response({"error": "syntax error", "request": raw_command}) else: self.dispatcher.push_request(self.session, command) + # sleep a bit to prevent a single session from DOSing the queue + time.sleep(0.01) return True