Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed May 12, 2024
1 parent 240e132 commit 10379b5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3197,14 +3197,13 @@ func (c *Client) writePublication(ch string, pub *protocol.Publication, prep pre

if deltaAllowed {
return c.transportEnqueue(prep.localDeltaData, ch, protocol.FrameTypePushPublication)
} else {
c.mu.Lock()
if chCtx, chCtxOK := c.channels[ch]; chCtxOK {
chCtx.flags |= flagDeltaAllowed
c.channels[ch] = chCtx
}
c.mu.Unlock()
}
c.mu.Lock()
if chCtx, chCtxOK := c.channels[ch]; chCtxOK {
chCtx.flags |= flagDeltaAllowed
c.channels[ch] = chCtx
}
c.mu.Unlock()
}
return c.transportEnqueue(prep.fullData, ch, protocol.FrameTypePushPublication)
}
Expand Down

0 comments on commit 10379b5

Please sign in to comment.