Update fdbrpc/FlowTransport.actor.cpp

This commit is contained in:
A.J. Beamon 2021-03-11 17:54:30 -08:00 committed by Markus Pilman
parent 3342d9438e
commit 7031b8f437

View File

@ -1070,10 +1070,8 @@ static void scanPackets(TransportData* transport,
// we ignore packets to unknown endpoints if they're not going to a stream anyways, so we can just // we ignore packets to unknown endpoints if they're not going to a stream anyways, so we can just
// return here. The main place where this seems to happen is if a ReplyPromise is not waited on // return here. The main place where this seems to happen is if a ReplyPromise is not waited on
// long enough. // long enough.
// It would be slightly more elegant/readable to put this if-block into the deliver actor, but if // It would be slightly more elegant to put this if-block
// we have many messages to UnknownEndpoint we want to optimize earlier. As deliver is an actor it if (priority != TaskPriority::UnknownEndpoint || (token.first() & TOKEN_STREAM_FLAG) != 0) {
// will allocate some state on the heap and this prevents it from doing that.
if (priority != TaskPriority::UnknownEndpoint || (token.first() & TOKEN_STREAM_FLAG) == 0) {
deliver(transport, Endpoint({ peerAddress }, token), priority, std::move(reader), true); deliver(transport, Endpoint({ peerAddress }, token), priority, std::move(reader), true);
} }