Set identity when socket re-created