update transportRegistry

avoid leaks of SOCKET and leaving mutex locked
when exceptions are thrown.
This commit is contained in:
Michael Davidsaver
2018-02-01 18:54:25 -08:00
parent 5a86835a6f
commit 58f996fd98
14 changed files with 278 additions and 298 deletions

View File

@ -10,6 +10,7 @@ TESTS += testChannelAccess
TESTPROD_HOST += testCodec
testCodec_SRCS = testCodec
testHarness_SRCS += testCodec.cpp
testCodec_SYS_LIBS_WIN32 += ws2_32
TESTS += testCodec
TESTPROD_HOST += testRPC

View File

@ -113,6 +113,9 @@ public:
_writeBuffer(sendBufferSize),
_dummyAddress()
{
dummyAddr.ia.sin_family = AF_INET;
dummyAddr.ia.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
dummyAddr.ia.sin_port = htons(42);
}
@ -353,7 +356,7 @@ public:
}
const osiSockAddr* getRemoteAddress() const {
return 0;
return &dummyAddr;
}
std::string dummyRemoteName;
const std::string& getRemoteName() const {
@ -412,6 +415,7 @@ public:
}
osiSockAddr dummyAddr;
std::size_t _closedCount;
std::size_t _invalidDataStreamCount;
std::size_t _scheduleSendCount;