Skip to content

Commit

Permalink
update amalgamated sources
Browse files Browse the repository at this point in the history
  • Loading branch information
nekipelov committed Oct 18, 2017
1 parent e2a6501 commit a0a10c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions amalgamated/redisclient.cpp
Expand Up @@ -302,21 +302,21 @@ void RedisClientImpl::doProcessMessage(RedisValue v)
const RedisValue &command = result[0];
const RedisValue &queueName = result[(resultSize == 3)?1:2];
const RedisValue &value = result[(resultSize == 3)?2:3];
const RedisValue &pattern = (resultSize == 4) ? result[1] : "";
const RedisValue &pattern = (resultSize == 4) ? result[1] : queueName;

std::string cmd = command.toString();

if( cmd == "message" || cmd == "pmessage" )
{
SingleShotHandlersMap::iterator it = singleShotMsgHandlers.find(queueName.toString());
SingleShotHandlersMap::iterator it = singleShotMsgHandlers.find(pattern.toString());
if( it != singleShotMsgHandlers.end() )
{
strand.post(std::bind(it->second, value.toByteArray()));
singleShotMsgHandlers.erase(it);
}

std::pair<MsgHandlersMap::iterator, MsgHandlersMap::iterator> pair =
msgHandlers.equal_range(queueName.toString());
msgHandlers.equal_range(pattern.toString());
for(MsgHandlersMap::iterator handlerIt = pair.first;
handlerIt != pair.second; ++handlerIt)
{
Expand Down

0 comments on commit a0a10c0

Please sign in to comment.