mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-15 17:51:06 +00:00
feat(server): Add backlog
flag for listen()
(#2456)
* feat(server): Add `backlog` flag for `listen()`
This commit is contained in:
parent
a16b940a65
commit
b777d31a98
1 changed files with 3 additions and 0 deletions
|
@ -73,6 +73,8 @@ ABSL_FLAG(bool, force_epoll, false,
|
|||
ABSL_FLAG(bool, version_check, true,
|
||||
"If true, Will monitor for new releases on Dragonfly servers once a day.");
|
||||
|
||||
ABSL_FLAG(uint16_t, tcp_backlog, 128, "TCP listen(2) backlog parameter.");
|
||||
|
||||
using namespace util;
|
||||
using namespace facade;
|
||||
using namespace io;
|
||||
|
@ -711,6 +713,7 @@ Usage: dragonfly [FLAGS]
|
|||
pool->Run();
|
||||
|
||||
AcceptServer acceptor(pool.get());
|
||||
acceptor.set_back_log(absl::GetFlag(FLAGS_tcp_backlog));
|
||||
|
||||
int res = dfly::RunEngine(pool.get(), &acceptor) ? 0 : -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue