Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use TCP_NODELAY

  • Loading branch information...
commit c8db0c300f3967c92b2323905448cdb8552bd0a9 1 parent de17288
@CFSworks CFSworks authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 minerutil/RPCProtocol.py
View
4 minerutil/RPCProtocol.py
@@ -23,6 +23,7 @@
import json
import sys
import httplib
+import socket
from twisted.internet import defer, reactor, error, threads
from twisted.python import failure
@@ -39,6 +40,9 @@ def _doRequest(self, url, *args):
self.connection = httplib.HTTPConnection(url.hostname,
url.port or 80,
timeout=self.timeout)
+ self.connection.connect()
+ self.connection.sock.setsockopt(socket.SOL_TCP,
+ socket.TCP_NODELAY, 1)
try:
self.connection.request(*args)
return self.connection.getresponse()
Please sign in to comment.
Something went wrong with that request. Please try again.