Fix endpoint cnt decline overflow

Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
Lei Jitang 2016-07-14 22:52:44 -04:00
parent 404d7b6d47
commit 1010f32008
1 changed files with 3 additions and 1 deletions

View File

@ -143,7 +143,9 @@ retry:
if inc {
ec.Count++
} else {
ec.Count--
if ec.Count > 0 {
ec.Count--
}
}
ec.Unlock()