brontide: fix typo
This commit is contained in:
parent
eb1affd5da
commit
e06768e4eb
@ -62,8 +62,8 @@ func Dial(local keychain.SingleKeyECDH, netAddr *lnwire.NetAddress,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We'll ensure that we get ActTwo from the remote peer in a timely
|
// We'll ensure that we get ActTwo from the remote peer in a timely
|
||||||
// manner. If they don't respond within 1s, then we'll kill the
|
// manner. If they don't respond within handshakeReadTimeout, then
|
||||||
// connection.
|
// we'll kill the connection.
|
||||||
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.conn.Close()
|
b.conn.Close()
|
||||||
|
@ -115,8 +115,8 @@ func (l *Listener) doHandshake(conn net.Conn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We'll ensure that we get ActOne from the remote peer in a timely
|
// We'll ensure that we get ActOne from the remote peer in a timely
|
||||||
// manner. If they don't respond within 1s, then we'll kill the
|
// manner. If they don't respond within handshakeReadTimeout, then
|
||||||
// connection.
|
// we'll kill the connection.
|
||||||
err := conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
err := conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
brontideConn.conn.Close()
|
brontideConn.conn.Close()
|
||||||
@ -160,8 +160,8 @@ func (l *Listener) doHandshake(conn net.Conn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We'll ensure that we get ActTwo from the remote peer in a timely
|
// We'll ensure that we get ActTwo from the remote peer in a timely
|
||||||
// manner. If they don't respond within 1 second, then we'll kill the
|
// manner. If they don't respond within handshakeReadTimeout, then
|
||||||
// connection.
|
// we'll kill the connection.
|
||||||
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
brontideConn.conn.Close()
|
brontideConn.conn.Close()
|
||||||
|
@ -870,7 +870,7 @@ func (b *Machine) ReadHeader(r io.Reader) (uint32, error) {
|
|||||||
// ReadBody attempts to ready the next message body from the passed io.Reader.
|
// ReadBody attempts to ready the next message body from the passed io.Reader.
|
||||||
// The provided buffer MUST be the length indicated by the packet length
|
// The provided buffer MUST be the length indicated by the packet length
|
||||||
// returned by the preceding call to ReadHeader. In the case of an
|
// returned by the preceding call to ReadHeader. In the case of an
|
||||||
// authentication eerror, a non-nil error is returned.
|
// authentication error, a non-nil error is returned.
|
||||||
func (b *Machine) ReadBody(r io.Reader, buf []byte) ([]byte, error) {
|
func (b *Machine) ReadBody(r io.Reader, buf []byte) ([]byte, error) {
|
||||||
// Next, using the length read from the packet header, read the
|
// Next, using the length read from the packet header, read the
|
||||||
// encrypted packet itself into the buffer allocated by the read
|
// encrypted packet itself into the buffer allocated by the read
|
||||||
|
Loading…
Reference in New Issue
Block a user