don't export checkIsNetTimeout
This commit is contained in:
parent
56c6b7b352
commit
5713b58c7c
@ -25,7 +25,7 @@ func (cs ConnectionState) Format() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckIsNetTimeout(err error) bool {
|
func checkIsNetTimeout(err error) bool {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ func (this *HubConnection) worker() {
|
|||||||
this.conn.SetReadDeadline(time.Now().Add(SEND_KEEPALIVE_EVERY))
|
this.conn.SetReadDeadline(time.Now().Add(SEND_KEEPALIVE_EVERY))
|
||||||
nbytes, err = this.conn.Read(readBuff)
|
nbytes, err = this.conn.Read(readBuff)
|
||||||
|
|
||||||
if CheckIsNetTimeout(err) {
|
if checkIsNetTimeout(err) {
|
||||||
// No data before read deadline
|
// No data before read deadline
|
||||||
err = nil
|
err = nil
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user