Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed possible coroutine leaks caused by closing the connection with SetDeadline #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ func (s *UDPSession) SetDeadline(t time.Time) error {
s.wd = t
s.notifyReadEvent()
s.notifyWriteEvent()
return nil
return s.conn.SetDeadline(t)
}

// SetReadDeadline implements the Conn SetReadDeadline method.
Expand All @@ -389,7 +389,7 @@ func (s *UDPSession) SetReadDeadline(t time.Time) error {
defer s.mu.Unlock()
s.rd = t
s.notifyReadEvent()
return nil
return s.conn.SetReadDeadline(t)
}

// SetWriteDeadline implements the Conn SetWriteDeadline method.
Expand All @@ -398,7 +398,7 @@ func (s *UDPSession) SetWriteDeadline(t time.Time) error {
defer s.mu.Unlock()
s.wd = t
s.notifyWriteEvent()
return nil
return s.conn.SetWriteDeadline(t)
}

// SetWriteDelay delays write for bulk transfer until the next update interval
Expand Down