Skip to content

Commit

Permalink
remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed May 22, 2019
1 parent c24659c commit 78e18b2
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,47 +248,17 @@ func (s *Stream) cancelDeadlines() {
}

func (s *Stream) SetDeadline(t time.Time) error {
// s.clLock.Lock()
// defer s.clLock.Unlock()

// if s.closedRemote && s.isClosed() {
// return errStreamClosed
// }

// if !s.closedRemote {
// s.rDeadline.set(t)
// }

// if !s.isClosed() {
// s.wDeadline.set(t)
// }

s.rDeadline.set(t)
s.wDeadline.set(t)

return nil
}

func (s *Stream) SetReadDeadline(t time.Time) error {
// s.clLock.Lock()
// defer s.clLock.Unlock()

// if s.closedRemote {
// return errStreamClosed
// }

s.rDeadline.set(t)
return nil
}

func (s *Stream) SetWriteDeadline(t time.Time) error {
// s.clLock.Lock()
// defer s.clLock.Unlock()

// if s.isClosed() {
// return errStreamClosed
// }

s.wDeadline.set(t)
return nil
}

0 comments on commit 78e18b2

Please sign in to comment.