Open BelindaLiu opened 7 years ago
set conn_max in config file pen_config and run:
conn_max
pen_config
bash-4.3# cat pen_config listen 0.0.0.0:5353 server 1 address 127.0.0.1 port 31671 weight 1 conn_max 1000 bash-4.3# pen -f -F pen_config 0.0.0.0:5353 2017-02-14 09:54:39: do_cmd: server 1 address 127.0.0.1 0 2017-02-14 09:54:39: Before: conns = 0, connections_max = 0, clients = 0x56434c105020, clients_max = 1000 2017-02-14 09:54:39: After: conns = 0x56434c12e080, connections_max = 500, clients = 0x56434c105020, clients_max = 1000
In the result above, the clients_max has been changed to 1000, however, the connections_max has NOT as expected.
clients_max
connections_max
We find the possible typo in file pen.c, from line 1313 to 1317 as follow,
} else if (!strcmp(p, "conn_max")) { p = strtok(NULL, " "); if (p) expand_clienttable(atoi(p)); output(op, "%d\n", connections_max);
I think the function should be expand_conntable instead of expand_clienttable.
expand_conntable
expand_clienttable
You are right. The typo has been fixed and a correct version will be released shortly.
Observation:
set
conn_max
in config filepen_config
and run:In the result above, the
clients_max
has been changed to 1000, however, theconnections_max
has NOT as expected.Possible reason:
We find the possible typo in file pen.c, from line 1313 to 1317 as follow,
I think the function should be
expand_conntable
instead ofexpand_clienttable
.