BeeOnRope wrote:

> I'd like to submit a patch for this issue, but I'd like advice on the
> correct way to fix it.  Suggestion 1 is to simple remove the "force"
> option on the connection_free call - why are we using it this
> context?  Is there some reason to ignore the refcount here?  This fix

yes, coz we need to get rid of that dead connection in case of reconnect
and there seems to be no simple and elegant way but force free/close it.

> is easy and seems "correct" to me.  Suggestion 2, if there is some
> reason to keep this force behavior, is to add code in the force case
> that locks the request list and iterates though it looking for
> references to the connection to be freed and removing them (NULLing
> them out) - thus we won't try to access them in the connection lost
> code, above.

that seems like the way to go to me. i think its best to address this
inside nsldapi_handle_reconnect, a loop just like you have mentioned,
right above nsldapi_free_connection(), holding LDAP_REQ_LOCK as well,
iterating and cleaning up.


_______________________________________________
dev-tech-ldap mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-ldap

Reply via email to