Never mind. Think I found the problem. It appears if the connection attempt fails, because the server is down, the initialize(...) call succeeds - it is a lazy call. That is it returns what appears to be a valid connection, hasn't tried to talk to the server. The simple_bind_s does talk to the server and fails.
Then when the server comes up, it uses the connection returned by the last initialize(...) call, where the bind failed, and tries to do the operation on it. This operation doesn't fail, because it thinks there is a good connection, even though bind failed. The solution seems to be to set self._obj = None at the top of _reconnect, and only set it after the simple_bind_s call succeeded. So that way it will never try to use an existing connection unless the bind succeeded. What is strange is I thought I had fully tested this code :-( My updated revision: https://gist.github.com/brianmay/6059401
_______________________________________________ melbourne-pug mailing list [email protected] http://mail.python.org/mailman/listinfo/melbourne-pug
