fix close nil channel when tcp listener not used

when tcp listener is not used, doneTcp will be nil