Skip to content

Commit e8dc4bb

Browse files
authored
Merge pull request #10 from guzba/ryan
0.1.9
2 parents ec92c48 + 6232813 commit e8dc4bb

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

ready.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "0.1.8"
1+
version = "0.1.9"
22
author = "Ryan Oldenburg"
33
description = "A Redis client for multi-threaded servers"
44
license = "MIT"

src/ready/connections.nim

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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

8892
proc 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

109117
proc recvBytes(conn: RedisConn) {.raises: [RedisError].} =

0 commit comments

Comments
 (0)