connectionLost is immediatly triggered


#1

Hi,

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 ?


#2

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).


#3

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

Thanks in advance for the feed-back.


#4

Hi Julian,

Did you find some time to manage that connectionLost issue ?


#5

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


#6

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.

Matt


#7

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…


#8

Hi Jules-

Is this resolved with the commit from December 9?

Thanks,

Matt


#9

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


#10

Works great for me on Windows - thanks very much.

Matt


#11

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.