Skip to content

Commit adca289

Browse files
committedApr 18, 2019
Check that packets still exist when we resume
Possible nil pointer deference, after getting all the keys still in the store it's possible that packets will arrive that cause them to be removed. Now check that the packet returned from the store is not nil resolves #291
1 parent 1c3a9d2 commit adca289

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎client.go

+3
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,9 @@ func (c *client) resume(subscription bool) {
671671
storedKeys := c.persist.All()
672672
for _, key := range storedKeys {
673673
packet := c.persist.Get(key)
674+
if packet == nil {
675+
continue
676+
}
674677
details := packet.Details()
675678
if isKeyOutbound(key) {
676679
switch packet.(type) {

0 commit comments

Comments
 (0)
Please sign in to comment.