Skip to content

Conversation

@DBX12
Copy link

@DBX12 DBX12 commented Oct 17, 2017

Initial motivation:
If the connection to the MySQL server is unstable, Nimda might lose connection to the server and attempts to re-run the query after a reconnecting to the server. Given the unstable connection, it might fail again to execute the query. Rinse and repeat, it will descend into recursion breaking Nimda.

What I have done:
Added a counter for the reconnection attempts (actually it counts the failed queries until one succeeds but it boils down to the reconnection attempts) and a trigger_error after n failed attempts (currently 5).

Request for comments: Always (what else ;) ) I picked the severity E_USER_WARNING based on the other calls of trigger_error

Copy link
Contributor

@livinskull livinskull left a comment

Choose a reason for hiding this comment

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

LGTM

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