connectionLost is immediatly triggered


Trying to set up and interprocess comm, I use InterprocessConnection but its method connectionLost is triggered immediatly after the related pipe has been created.
It looks like the connection can’t wait.

The same story happens also in the Juce demo.

Has somebody a clue ?

If this is on windows, then I’ve just hit exactly the same thing myself and am working on it. (It’s actually a bit tricky… will check something in later today probably).

Yes, it’s on Windows 7 64b. Not yet tested with another flavour of the Microsoft OSs.

Thanks in advance for the feed-back.

Hi Julian,

Did you find some time to manage that connectionLost issue ?

Sorry, got side-tracked this week, but don’t worry: I need this fix myself so it’ll get done very soon!

I think it’s just a question of changing this:

bool NamedPipe::isOpen() const { return pimpl != nullptr && pimpl->connected; }

To this:

bool NamedPipe::isOpen() const { return pimpl != nullptr; }

juce_win32_Files.cpp, line 819.

Seems to work fine for me. As far as I can tell the “connected” variable is only tracking whether or not a read or write is in progress.


Yeah, that was my first thought too, but it breaks other things. The correct fix is a bit more complex, as it also needs to behave the same on other platforms. Sorry, I’ll definitely be on the case with this in the next few days…

Hi Jules-

Is this resolved with the commit from December 9?



Should be - it now works for me. If you’re doing something different that still doesn’t work, let me know.

Works great for me on Windows - thanks very much.


Thank you for this fix Julian.

But I fear the InterprocessConnection should need some additional codeworking on Linux (connectionLost is never triggered).
I’ll open a new post.