Skip to content

Commit

Permalink
fix client error
Browse files Browse the repository at this point in the history
  • Loading branch information
felipejfc committed Apr 13, 2018
1 parent 611b713 commit fb69b54
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ func (c *Client) handleHandshakeResponse() error {
log.Debug("got handshake from sv, data: %v", handshake)

if handshake.Sys.Dict != nil {
err := message.SetDictionary(handshake.Sys.Dict)
if err != nil {
return err
}
message.SetDictionary(handshake.Sys.Dict)
}
p, err := c.packetEncoder.Encode(packet.HandshakeAck, []byte{})
if err != nil {
Expand Down Expand Up @@ -218,7 +215,6 @@ func (c *Client) sendHeartbeats(interval int) {
// Disconnect disconnects the client
func (c *Client) Disconnect() {
if c.Connected {
message.SetDictionary(map[string]uint16{})
c.Connected = false
close(c.closeChan)
c.conn.Close()
Expand Down

0 comments on commit fb69b54

Please sign in to comment.