There's only so long you can hold back on vital information when a PC is surreptitiously spying on a conference between scheming NPCs. The old standby of guards or security devices handy to spot any such spying activity can easily be circumvented by any party of heroes worth their adventuring salt.
The other option is to spin the conversation out into tedious chit-chat that has nothing to do with the plot. Any sane player would rather attempt a frontal attack on a heavily fortified enemy base than to overhear the minutiae of a discussion between important NPCs on the merits or otherwise of the opera they watched the previous night and whether or not the lead soprano reminded them of their great aunt Hilda.
So if you ever need to prevent a PC from learning something important by spying on a conversation, just recall the most dull conversation you were ever forced to endure, and replay it for the benefit of your players.
Transcript
Count Dookû: And what of zees bounty 'unter, Zhango Fett?
Nute Gunray: He blings an army of crones to our cause.
Count Dookû: Ah do not trust 'eem. 'e eez driven bah revenge, not righteousness.
Nute Gunray: He is insane. We shall utirise him and toss him aside rike the trash he is.
Count Dookû: 'ow do Ah know you weel not do ze same wiz us?
Nute Gunray: Because you have demonstrated your abirity. Or rather, you will, will you not?
Count Dookû: Ondeed! Sacrebleu!
Count Dookû: 'ere, Ah 'ave, 'ow you say... acquired a copy of ze plans for ze so-called "Peace Moon" of Naboo.
Obi-Wan: Aha! He has the plans!
Nute Gunray: And how, precisery, does peace further our cause?
Count Dookû: 'ow about we discuss zis over ze bottle of Château d'Yquem?
Nute Gunray: Ah, you have discovered the weakness in my parate.
Obi-Wan: Okay, I've heard enough. I need to report to the Jedi Council. {leaves}
Padmé: Yeah, they won't believe they're having Yquem without foie gras.