Open GoogleCodeExporter opened 9 years ago
With RCF 1.2 and earlier, RCF servers will reuse named pipe connections. There
is a
bug with this functionality - to fix it in RCF 1.2, open the file
Win32NamedPipeServerTransport.cpp, and at the top, replace the
Win32NamedPipeSessionState constructor and destructor with the following code:
Win32NamedPipeSessionState::Win32NamedPipeSessionState(
Win32NamedPipeServerTransport & transport,
HANDLE hPipe) :
IocpSessionState(transport),
mTransport(transport),
mhPipe(hPipe)
{
mSessionPtr = mTransport.mpSessionManager->createSession();
mSessionPtr->setProactor(*this);
mEnableReconnect = false;
}
Win32NamedPipeSessionState::~Win32NamedPipeSessionState()
{
RCF_DTOR_BEGIN
mEnableReconnect = false;
postClose();
if (mPreState == Accepting)
{
{
Lock lock(mTransport.mQueuedAcceptsMutex);
--mTransport.mQueuedAccepts;
}
if (!mTransport.mPipeName.empty() && mTransport.mOpen)
{
mTransport.createSessionState()->accept();
}
}
RCF_DTOR_END
}
Original comment by jarl.lin...@gmail.com
on 6 Mar 2010 at 1:22
Original comment by jarl.lin...@gmail.com
on 6 Mar 2010 at 1:23
Original issue reported on code.google.com by
jarl.lin...@gmail.com
on 6 Mar 2010 at 1:17