File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 3
3
import threading
4
4
from redis .exceptions import ConnectionError , ResponseError , InvalidResponse
5
5
6
- # Jython doesn't define socket.SOL_TCP, but works fine with it's value, 6
7
- try :
8
- SOL_TCP = socket .SOL_TCP
9
- except AttributeError :
10
- SOL_TCP = 6
11
6
12
7
class BaseConnection (object ):
13
8
"Manages TCP communication to and from a Redis server"
@@ -39,7 +34,7 @@ def connect(self, redis_instance):
39
34
error_message = "Error %s connecting %s:%s. %s." % \
40
35
(e .args [0 ], self .host , self .port , e .args [1 ])
41
36
raise ConnectionError (error_message )
42
- sock .setsockopt (SOL_TCP , socket .TCP_NODELAY , 1 )
37
+ sock .setsockopt (socket . IPPROTO_TCP , socket .TCP_NODELAY , 1 )
43
38
self ._sock = sock
44
39
self ._fp = sock .makefile ('r' )
45
40
redis_instance ._setup_connection ()
You can’t perform that action at this time.
0 commit comments