Skip to content

Conversation

@jfclere
Copy link
Member

@jfclere jfclere commented Jun 23, 2023

No need to fix 2.0.x / main the logic there uses only 1 worker.

@jfclere jfclere requested a review from jajik June 23, 2023 14:32
Copy link
Member

@jajik jajik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes, but it seems ok.

int sizew = balancer->workers->elt_size;
int j;
ptrw = balancer->workers->elts;
for (j = 0; j < balancer->workers->nelts; j++, ptrw=ptrw+sizew) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add spaces around operators. Also, it might be cleaner to write ptrw += sizew, but it's up to you.

Comment on lines +2213 to +2217
if (strcasecmp((*worker)->s->scheme, "HTTP") == 0 ||
strcasecmp((*worker)->s->scheme, "HTTPS") == 0) {
if ((*worker)->s->port == ws_worker->s->port &&
!strcmp((*worker)->s->route, ws_worker->s->route) &&
!strcmp((*worker)->s->hostname, ws_worker->s->hostname)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird to me that for strcasecmp it is used == 0 and for strcmp it's negation. I would unify that. The former seems a bit cleaner.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more place where we have == 0 in the conditions I think we should cleanup all those in a separate PR.

@jfclere jfclere merged commit b01beb8 into modcluster:1.3.x Jun 27, 2023
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

Successfully merging this pull request may close these issues.

2 participants