• Ian Barber's avatar
    As Martin pointed out, there is a race condition in the old code where a pipe… · a5f7300d
    Ian Barber authored
    As Martin pointed out, there is a race condition in the old code where a pipe could start shutting down after disconnection, but the new one could connect first. This connection would not get a pipe created for it, so the messages could never flow. The simplest way round this would be a flag, but it is possibly for a very bouncy but fast connection to go up and down twice I imagine, so instead I have added a counter. This starts at zero, and will null out the pipe if terminate is called while it is zero. On a disconnect situation the counter is incremented, and the pipe is the not nulled if the value is non zero. In the terminated function it is decremented for each pipe that is shut down, and the assertion that the terminated pipe == the current pipe is skipped while it is non-zero. This should deal with the race condition and not allow any extra terminated() calls without hitting the assertion.
    a5f7300d
Name
Last commit
Last update
builds Loading commit data...
doc Loading commit data...
foreign/openpgm Loading commit data...
include Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
configure.in Loading commit data...
version.sh Loading commit data...