mirror of https://github.com/qwqdanchun/nps.git
add some logs
This commit is contained in:
parent
aad7ed8f24
commit
49b3da01cd
|
@ -250,7 +250,7 @@ func (Self *ReceiveWindow) calcSize() {
|
||||||
// twice grow
|
// twice grow
|
||||||
}
|
}
|
||||||
if n > (common.MAXIMUM_WINDOW_SIZE / uint32(conns)) {
|
if n > (common.MAXIMUM_WINDOW_SIZE / uint32(conns)) {
|
||||||
//logs.Warn("window too large", n)
|
logs.Warn("window too large, calculated:", n, "limit:", common.MAXIMUM_WINDOW_SIZE/uint32(conns))
|
||||||
n = common.MAXIMUM_WINDOW_SIZE / uint32(conns)
|
n = common.MAXIMUM_WINDOW_SIZE / uint32(conns)
|
||||||
}
|
}
|
||||||
// set the maximum size
|
// set the maximum size
|
||||||
|
@ -479,7 +479,7 @@ func (Self *SendWindow) SetSize(currentMaxSizeDone uint64) (closed bool) {
|
||||||
ptrs := atomic.LoadUint64(&Self.maxSizeDone)
|
ptrs := atomic.LoadUint64(&Self.maxSizeDone)
|
||||||
maxsize, send, wait = Self.unpack(ptrs)
|
maxsize, send, wait = Self.unpack(ptrs)
|
||||||
if read > send {
|
if read > send {
|
||||||
logs.Error("read > send")
|
logs.Error("window read > send: max size:", currentMaxSize, "read:", read, "send", send)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if read == 0 && currentMaxSize == maxsize {
|
if read == 0 && currentMaxSize == maxsize {
|
||||||
|
|
Loading…
Reference in New Issue