also notify writing cond if we close the channel