Revert "Unlock mutex when we find a matching connection"

This reverts commit 84fa208a76fc6415d4e5f4c6cb4f1101799b3c89.