cleanup connection when channel is closed