Fix mutex lock missing. (#1214)
This commit is contained in:
parent
3d3daef3c5
commit
6971f84dae
|
@ -93,6 +93,7 @@ RedisConnectionPtr RedisClientImpl::newConnection(trantor::EventLoop *loop)
|
|||
auto loop = trantor::EventLoop::getEventLoopOfCurrentThread();
|
||||
assert(loop);
|
||||
loop->runAfter(2.0, [thisPtr, loop, conn]() {
|
||||
std::lock_guard<std::mutex> lock(thisPtr->connectionsMutex_);
|
||||
thisPtr->connections_.insert(thisPtr->newConnection(loop));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue