Skip to content

Conversation

@MegaManSec
Copy link
Contributor

Shouldn't actually happen, but I think it's worth it just in case.

P.S: this is my last PR:)

return err
}

if !plugin.proxy.clientsCountInc() {
Copy link
Member

Choose a reason for hiding this comment

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

Step into this. The counter will not increase, if reaches the up bound. AI without review?

Copy link
Contributor Author

@MegaManSec MegaManSec Sep 25, 2025

Choose a reason for hiding this comment

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

I don't see how the upper bound is directly relevant to the change here. It's about processIncomingQuery and how if a panic occurs somewhere in that, the counter is never from deincremented. If that happens over and over, the server will be inoperable after the never-deincremented variable reaches the limit of clientscount (yes, the upper bound)

Copy link
Member

@lifenjoiner lifenjoiner Sep 25, 2025

Choose a reason for hiding this comment

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

If panic, won't the program crash?

Strange things happened in my mind about this defer. 😂

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