Any can of consumer-level wasp spray should indicate the distance for safe use. The farther away you stand, the less accurate you’ll be. On the other hand, swarming wasps are more likely to sting you if you’re close to the nest and you miss them with the spray. Stand near the limit of the recommended distance.