Skip to content

Commit

Permalink
do not use SetReadDeadline/SetWriteDeadline refers to golang/go#15133
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexStocks committed Oct 1, 2016
1 parent a3b4d63 commit e56a138
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion dev.list
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
## develop history ##
---

- 2016/10/01
> 1 remark SetReadDeadline & SetWriteDeadline in session.go (ref: https://github.com/golang/go/issues/15133)
>
> 3 version: 0.3.14

- 2016/09/30
> 1 modify wheel time interval from 1 second to 100ms.
>
> 2 modify session.go:(Session)WritePkg timeout
>
> 2 version: 0.3.13
> 3 version: 0.3.13

- 2016/09/27
> 1 fix bug: getty panic when conn.RemoteAddr() is nil in session.go:(Session)sessionToken()
Expand Down
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (this *Session) WritePkg(pkg interface{}) error {

// for codecs
func (this *Session) WriteBytes(pkg []byte) error {
this.conn.SetWriteDeadline(time.Now().Add(this.wDeadline))
// this.conn.SetWriteDeadline(time.Now().Add(this.wDeadline))
_, err := this.write(pkg)
return err
}
Expand Down Expand Up @@ -504,7 +504,7 @@ func (this *Session) handlePackage() {

bufLen = 0
for { // for clause for the network timeout condition check
this.conn.SetReadDeadline(time.Now().Add(this.rDeadline))
// this.conn.SetReadDeadline(time.Now().Add(this.rDeadline))
bufLen, err = this.read(buf)
if err != nil {
if nerr, ok = err.(net.Error); ok && nerr.Timeout() {
Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package getty

const (
Version = "0.3.13"
Version = "0.3.14"
GETTY_MAJOR = 0
GETTY_MINOR = 3
GETTY_BUILD = 13
GETTY_BUILD = 14
)

0 comments on commit e56a138

Please sign in to comment.