diff --git a/Project.toml b/Project.toml index 24f0fc3..55da180 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Jedis" uuid = "b89ccfe0-2c5f-46f6-b89b-da3e1c2e286f" authors = ["Jack Chan "] -version = "0.2.11" +version = "0.2.12" [deps] MbedTLS = "739be429-bea8-5141-9913-cc70e7f3736d" diff --git a/src/pubsub.jl b/src/pubsub.jl index 5fff2df..003002e 100644 --- a/src/pubsub.jl +++ b/src/pubsub.jl @@ -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)