The integral would diverge if distant stars were not elipsed by nearer stars.
When eclipses are taken into account,
the flux at the observer is finite and is equall to the flux at the surface of the sun.
(L is the sun's luminosity, Ω is the solid angle , n is the number density)
星が重なって、奥の星からの光が届かないようにすると全光量は有限になりそうだなというのは分かりますが、それが太陽表面のfluxに等しいというのがよく分からない・・・