s3: Fix g_lock_lock after the select/poll conversion