From c20f884d68442481f8d04a5dca0451d3db7e866b Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 29 Jul 2019 23:39:08 -0400 Subject: [PATCH] mredis: fix how Block was being used, it wasn't being converted to an int properly --- mdb/mredis/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdb/mredis/stream.go b/mdb/mredis/stream.go index 0ee9fa1..f70fa4a 100644 --- a/mdb/mredis/stream.go +++ b/mdb/mredis/stream.go @@ -174,7 +174,8 @@ func (s *Stream) fillBufFrom(id string) error { if s.opts.ReadCount > 0 { args = append(args, "COUNT", strconv.Itoa(s.opts.ReadCount)) } - args = append(args, "BLOCK", strconv.Itoa(int(s.opts.Block.Seconds()))) + blockMS := int(s.opts.Block / time.Millisecond) + args = append(args, "BLOCK", strconv.Itoa(blockMS)) args = append(args, "STREAMS", s.opts.Key, id) var srEntries []streamReaderEntry