Skip to content

Commit

Permalink
[FIX] Handle null pubsub response
Browse files Browse the repository at this point in the history
  • Loading branch information
captchanjack committed Apr 10, 2022
1 parent 59acb84 commit 5e80fd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Jedis"
uuid = "b89ccfe0-2c5f-46f6-b89b-da3e1c2e286f"
authors = ["Jack Chan <[email protected]>"]
version = "0.2.11"
version = "0.2.12"

[deps]
MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d"
Expand Down
4 changes: 3 additions & 1 deletion src/pubsub.jl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ function psubscribe(fn::Function, pattern, patterns...; stop_fn::Function=(msg)

try
while true
type, pttrn = msg = recv(client.socket)
msg = recv(client.socket)
isnothing(msg) && continue
type, pttrn = msg

if type == "pmessage" && pttrn in client.psubscriptions
fn(msg)
Expand Down

2 comments on commit 5e80fd2

@captchanjack
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/58311

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.12 -m "<description of version>" 5e80fd21626e20844cad5f1c7fafcdb512392d89
git push origin v0.2.12

Please sign in to comment.