no op when new timeout setting is the same as previous

This commit is contained in:
v2ray
2016-01-04 22:01:46 +01:00
parent 30ed9fdddc
commit c74091453c
+3
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{