Flush channel registration error before closing the connection.