brontide: fix typo

This commit is contained in:
yyforyongyu 2020-11-30 20:48:39 +08:00
parent eb1affd5da
commit e06768e4eb
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
3 changed files with 12 additions and 12 deletions

View File

@ -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
// manner. If they don't respond within 1s, then we'll kill the
// connection.
// manner. If they don't respond within handshakeReadTimeout, then
// we'll kill the connection.
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
if err != nil {
b.conn.Close()

View File

@ -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
// manner. If they don't respond within 1s, then we'll kill the
// connection.
// manner. If they don't respond within handshakeReadTimeout, then
// we'll kill the connection.
err := conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
if err != nil {
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
// manner. If they don't respond within 1 second, then we'll kill the
// connection.
// manner. If they don't respond within handshakeReadTimeout, then
// we'll kill the connection.
err = conn.SetReadDeadline(time.Now().Add(handshakeReadTimeout))
if err != nil {
brontideConn.conn.Close()

View File

@ -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.
// The provided buffer MUST be the length indicated by the packet length
// 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) {
// Next, using the length read from the packet header, read the
// encrypted packet itself into the buffer allocated by the read