Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lesismal committed May 27, 2024
1 parent f136b1c commit a3458ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conn_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func (c *Conn) SetDeadline(t time.Time) error {
return nil
}

func (c *Conn) setDeadline(timer **time.Timer, returnErr error, t time.Time) error {
func (c *Conn) setDeadline(timer **time.Timer, errClose error, t time.Time) error {
c.mux.Lock()
defer c.mux.Unlock()
if c.closed {
Expand All @@ -485,7 +485,7 @@ func (c *Conn) setDeadline(timer **time.Timer, returnErr error, t time.Time) err
if !t.IsZero() {
if *timer == nil {
*timer = c.p.g.AfterFunc(time.Until(t), func() {
c.closeWithError(returnErr)
c.closeWithError(errClose)
})
} else {
(*timer).Reset(time.Until(t))
Expand Down Expand Up @@ -985,7 +985,7 @@ type udpConn struct {
func (u *udpConn) Close() error {
parent := u.parent
if parent.connUDP != u {
// This connection is created by reding from a UDP server,
// This connection is created by reading from a UDP server,
// need to clear itself from the UDP server.
parent.mux.Lock()
delete(parent.connUDP.conns, u.rAddrKey)
Expand Down

0 comments on commit a3458ca

Please sign in to comment.