func (c *Client) refreshDeadline(keepalive uint16) {
	if c.conn != nil {
		var expiry time.Time // Nil time can be used to disable deadline if keepalive = 0
		if keepalive > 0 {
			expiry = time.Now().Add(time.Duration(keepalive+(keepalive/2)) * time.Second)
		}
		c.conn.SetDeadline(expiry)
	}
}
// refreshDeadline refreshes the read/write deadline for the net.Conn connection.
refreshDeadline refreshes the read/write deadline for the net.Conn connection.
// refreshDeadline refreshes the read / write deadline for the net . Conn connection .
func (c *Client) refreshDeadline(keepalive uint16) {
	if c.conn != nil {
		var expiry time.Time 
		if keepalive > 0 {
			expiry = time.Now().Add(time.Duration(keepalive+(keepalive/2)) * time.Second)
		}
		c.conn.SetDeadline(expiry)
	}
}
func ( c * Client ) refreshDeadline ( keepalive uint16 ) { if c . conn != nil { var expiry time . Time if keepalive > 0 { expiry = time . Now ( ) . Add ( time . Duration ( keepalive + ( keepalive / 2 ) ) * time . Second ) } c . conn . SetDeadline ( expiry ) } }
refreshDeadline refreshes the read/write deadline for the net.Conn connection.
refreshDeadline refreshes the read / write deadline for the net . Conn connection .
// Nil time can be used to disable deadline if keepalive = 0