File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- version = " 0.1.8 "
1+ version = " 0.1.9 "
22author = " Ryan Oldenburg"
33description = " A Redis client for multi-threaded servers"
44license = " MIT"
Original file line number Diff line number Diff line change @@ -82,7 +82,11 @@ proc send*(
8282 for arg in args:
8383 msg.add " $" & $ arg.len & " \r\n " & arg & " \r\n "
8484
85- if conn.socket.send (msg[0 ].addr , msg.len.cint , MSG_NOSIGNAL ) < 0 :
85+ if conn.socket.send (
86+ msg[0 ].addr ,
87+ msg.len.cint ,
88+ when defined (MSG_NOSIGNAL ): MSG_NOSIGNAL else : 0
89+ ) < 0 :
8690 raise newException (RedisError , osErrorMsg (osLastError ()))
8791
8892proc send * (
@@ -103,7 +107,11 @@ proc send*(
103107 for arg in args:
104108 msg.add " $" & $ arg.len & " \r\n " & arg & " \r\n "
105109
106- if conn.socket.send (msg[0 ].addr , msg.len.cint , MSG_NOSIGNAL ) < 0 :
110+ if conn.socket.send (
111+ msg[0 ].addr ,
112+ msg.len.cint ,
113+ when defined (MSG_NOSIGNAL ): MSG_NOSIGNAL else : 0
114+ ) < 0 :
107115 raise newException (RedisError , osErrorMsg (osLastError ()))
108116
109117proc recvBytes (conn: RedisConn ) {.raises : [RedisError ].} =
You can’t perform that action at this time.
0 commit comments