Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If `killAfterIdleMs` is 0, time.After() function call makes memory leak. Refer to https://golang.org/pkg/time/#After. According to the document, the underlying Timer object is not recovered by the garbage collector if the timer is not fired. And It seems that if the duration is 0, it will not be released. Therefore, use one Timer object for idle time checking explicitly instead of the time.After() function.
- Loading branch information