fixed data race in AsyncConnection that sometimes caused client connections to terminate