Fix goroutine leak