We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b50c6e commit b57bfc5Copy full SHA for b57bfc5
protocol/keepalive/client.go
@@ -115,6 +115,14 @@ func (c *Client) messageHandler(msg protocol.Message) error {
115
116
func (c *Client) handleKeepAliveResponse(msgGeneric protocol.Message) error {
117
msg := msgGeneric.(*MsgKeepAliveResponse)
118
+ if msg.Cookie != c.config.Cookie {
119
+ return fmt.Errorf(
120
+ "%s: unexpected cookie in response, expected %d but received %d",
121
+ ProtocolName,
122
+ c.config.Cookie,
123
+ msg.Cookie,
124
+ )
125
+ }
126
if c.config != nil && c.config.KeepAliveResponseFunc != nil {
127
// Call the user callback function
128
return c.config.KeepAliveResponseFunc(msg.Cookie)
0 commit comments