mirror of https://github.com/status-im/consul.git
Check for error when sending RPC byte
This commit is contained in:
parent
992db5d291
commit
28c1e556d6
|
@ -80,6 +80,10 @@ func (l *RaftLayer) Dial(address string, timeout time.Duration) (net.Conn, error
|
|||
}
|
||||
|
||||
// Write the Raft byte to set the mode
|
||||
conn.Write([]byte{byte(rpcRaft)})
|
||||
_, err = conn.Write([]byte{byte(rpcRaft)})
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
return nil, err
|
||||
}
|
||||
return conn, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue