Use RedisEventArgs

This commit is contained in:
fbraem
2015-11-07 21:46:11 +01:00
parent 2f26d6adf5
commit fce0afab8e
4 changed files with 141 additions and 7 deletions

View File

@@ -40,16 +40,19 @@ void AsyncReader::runActivity()
try
{
RedisType::Ptr reply = _client.readReply();
redisResponse.notify(this, reply);
RedisEventArgs args(reply);
redisResponse.notify(this, args);
if ( args.isStopped() ) stop();
}
catch(TimeoutException&)
{
continue;
}
catch(Exception &)
catch(Exception& e)
{
RedisEventArgs args(&e);
redisException.notify(this, args);
stop();
}
if (!_activity.isStopped()) Thread::trySleep(100);
}
}