Temporarily moved mutex lock to start of connection, pending finalization