Skip to content

Commit

Permalink
Merge pull request #9 from guzba/ryan
Browse files Browse the repository at this point in the history
msg_nosignal
  • Loading branch information
guzba authored Jan 15, 2024
2 parents a7bce99 + 4f11a40 commit ec92c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ready/connections.nim
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ proc send*(
for arg in args:
msg.add "$" & $arg.len & "\r\n" & arg & "\r\n"

if conn.socket.send(msg[0].addr, msg.len.cint, 0) < 0:
if conn.socket.send(msg[0].addr, msg.len.cint, MSG_NOSIGNAL) < 0:
raise newException(RedisError, osErrorMsg(osLastError()))

proc send*(
Expand All @@ -103,7 +103,7 @@ proc send*(
for arg in args:
msg.add "$" & $arg.len & "\r\n" & arg & "\r\n"

if conn.socket.send(msg[0].addr, msg.len.cint, 0) < 0:
if conn.socket.send(msg[0].addr, msg.len.cint, MSG_NOSIGNAL) < 0:
raise newException(RedisError, osErrorMsg(osLastError()))

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

0 comments on commit ec92c48

Please sign in to comment.