[api] cleanup channel recreation code a bit