optimization: test address before fetching messages for it

This commit is contained in:
Eric House 2013-07-28 07:28:32 -07:00
parent 9951064439
commit 5f9b2e431f

View file

@ -859,6 +859,7 @@ CookieRef::send_stored_messages( HostID dest, const AddrInfo* addr )
logf( XW_LOGVERBOSE0, "%s(dest=%d)", __func__, dest );
assert( dest > 0 && dest <= 4 );
if ( addr->isCurrent() ) {
DBMgr* dbmgr = DBMgr::Get();
const char* cname = ConnName();
vector<DBMgr::MsgInfo> msgs;
@ -877,6 +878,7 @@ CookieRef::send_stored_messages( HostID dest, const AddrInfo* addr )
sentIDs.push_back( msg.msgID );
}
dbmgr->RemoveStoredMessages( sentIDs );
}
} /* send_stored_messages */
bool