more windows conditions on socket ref (the right version)