Skip to content

Conversation

@mit-da
Copy link

@mit-da mit-da commented Jun 14, 2023

Try and fix issue #242 by adding a retry on EINTR and a sleep before attempting to do so. This is based off of #291.
We happen to come across a few instances of EINTR in our usage every day and would like to add a single retry since it seems all further LDAP calls are successful. Only kept it to a single retry for now, though I could be convinced to raise it.

mit-da added 5 commits June 14, 2023 15:32
Try and fix issue python-ldap#242 by adding a retry on EINTR and a sleep before attempting to do so.
similar to original function to pass tests.
@mit-da
Copy link
Author

mit-da commented Jul 13, 2023

Apologies for the delay, pretty inexperienced with python. Made some changes to fix tests.

@spaceone
Copy link
Contributor

doesn't it already work when you use ldap.ldapobject.ReconnectLDAPObject instead of ldap.ldapobject.SimpleLDAPObject?

@mit-da
Copy link
Author

mit-da commented Jul 19, 2023

I tested with ldap.ldapobject.ReconnectLDAPObject and unfortunately the interrupts still occur and don't seem to retry. The bind action seems to work but a call to say modify a group will throw the error.

@mistotebe
Copy link
Contributor

Is setting the LDAP_OPT_RESTART option not working? Can you post the backtrace when this happens?

@mistotebe
Copy link
Contributor

-1 until we know if/when LDAP_OPT_RESTART is (not) enough. Don't want to paper over potential libldap bugs.

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.

3 participants