mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
fix(memcached): Register memcached listener to handle --maxclients
(#2985)
* fix(memcached): Register memcached listener to handle `--maxclients` We add other listeners to `listeners`, but we seem to have forgotten to do that to the memcached listener. * protocol() == REDIS
This commit is contained in:
parent
f20512e8b1
commit
653086c910
2 changed files with 4 additions and 2 deletions
|
@ -87,7 +87,8 @@ void AclFamily::StreamUpdatesToAllProactorConnections(const std::string& user, u
|
|||
auto update_cb = [&]([[maybe_unused]] size_t id, util::Connection* conn) {
|
||||
DCHECK(conn);
|
||||
auto connection = static_cast<facade::Connection*>(conn);
|
||||
if (!connection->IsHttp() && connection->cntx()) {
|
||||
if (connection->protocol() == facade::Protocol::REDIS && !connection->IsHttp() &&
|
||||
connection->cntx()) {
|
||||
connection->SendAclUpdateAsync(
|
||||
facade::Connection::AclUpdateMessage{user, update_cat, update_commands, update_keys});
|
||||
}
|
||||
|
|
|
@ -288,7 +288,8 @@ bool RunEngine(ProactorPool* pool, AcceptServer* acceptor) {
|
|||
|
||||
if (mc_port > 0 && !tcp_disabled) {
|
||||
auto listener = MakeListener(Protocol::MEMCACHE, &service);
|
||||
acceptor->AddListener(mc_port, listener.release());
|
||||
acceptor->AddListener(mc_port, listener.get());
|
||||
listeners.push_back(listener.release());
|
||||
}
|
||||
|
||||
service.Init(acceptor, listeners, opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue