Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conn_max doesn't function in config file. It modifies clients_max instead of connections_max #38

Open
BelindaLiu opened this issue Feb 14, 2017 · 1 comment

Comments

@BelindaLiu
Copy link

Observation:

set conn_max in config file pen_config and run:

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.

Possible reason:

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.

@UlricE
Copy link
Owner

UlricE commented Feb 17, 2017

You are right. The typo has been fixed and a correct version will be released shortly.

UlricE pushed a commit that referenced this issue Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants