no op when new timeout setting is the same as previous

pull/69/head
v2ray 2016-01-04 22:01:46 +01:00
parent 30ed9fdddc
commit c74091453c
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,9 @@ func (reader *TimeOutReader) GetTimeOut() int {
}
func (reader *TimeOutReader) SetTimeOut(value int) {
if value == reader.timeout {
return
}
reader.timeout = value
if value > 0 {
reader.worker = &timedReaderWorker{