fix: lint error fix: ut error fix: code review comments
* core: fix potential goroutine leak * core: fix 0 index, and add ut for routineleaking