reader: synchronize cleanup of connection