Skip to content

Commit

Permalink
Update redis.nim
Browse files Browse the repository at this point in the history
  • Loading branch information
r-4981 authored Sep 26, 2024
1 parent b043777 commit 519c348
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/redis.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,13 @@ proc ping*(r: Redis | AsyncRedis): Future[RedisStatus] {.multisync.} =
await r.sendCommand("PING")
result = await r.readStatus()

proc quit*(r: Redis | AsyncRedis): Future[void] {.multisync.} =
proc close*(r: Redis | AsyncRedis): Future[void] {.multisync.} =
## Close the connection
r.socket.close()

proc quit*(r: Redis | AsyncRedis): Future[void] {.multisync.} =
## Close the connection with using QUIT command
## Note: This command is regarded as deprecated since Redis version 7.2.0.
await r.sendCommand("QUIT")
raiseNoOK(r, await r.readStatus())
r.socket.close()
Expand Down

0 comments on commit 519c348

Please sign in to comment.