pivotal-jbarrett commented on a change in pull request #792:
URL: https://github.com/apache/geode-native/pull/792#discussion_r622495428
##########
File path: cppcache/src/TcrEndpoint.cpp
##########
@@ -504,14 +504,15 @@ void TcrEndpoint::pingServer(ThinClientPoolDM* poolDM) {
}
if (!m_msgSent && !m_pingSent) {
- TcrMessagePing* pingMsg = TcrMessage::getPingMessage(m_cacheImpl);
+ TcrMessagePing pingMsg(new DataOutput(m_cacheImpl->createDataOutput()),
+ true);
Review comment:
If this value is always `true` then let's just roll it into the
constructor initializer and remove from parameters.
##########
File path: cppcache/src/TcrEndpoint.cpp
##########
@@ -504,14 +504,15 @@ void TcrEndpoint::pingServer(ThinClientPoolDM* poolDM) {
}
if (!m_msgSent && !m_pingSent) {
- TcrMessagePing* pingMsg = TcrMessage::getPingMessage(m_cacheImpl);
+ TcrMessagePing pingMsg(new DataOutput(m_cacheImpl->createDataOutput()),
Review comment:
Can you copy my PR where I modified the constructor to take a
`std::unique_ptr<DataOutput>` to avoid any leaking potentials in allocating
here and failing to take ownership in the constructor. Also makes it more clean
who owns it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]