[ZODB-Dev] ZEO authentication
Jim Fulton
jim at zope.com
Mon Jun 14 09:50:44 EDT 2010
On Sat, Jun 12, 2010 at 9:17 PM, Nitro <nitro at dr-code.org> wrote:
> Hello,
>
> I am using ZEO authentication. When I try to login with the proper
> credentials (everything works just fine. If I try to login with the wrong
> credentials, I get a traceback like shown below. However, the code trying
> to establish the connection (in my case databaseFromConfig) never returns,
> instead the client tries to reconnect over and over again. Of course
> reconnecting will always fail since the credentials stay wrong.
>
> I can't display a message to the user that his login attempt failed,
> because I never receive an exception in the code that tried to establish
> the connection.
>
> Is this a bug?
It is a miss-feature. The assumption is that failures are transient and
that the client should retry indefinitely. After all, your client might have
correct credentials and the server's configuration may be wrong. :)
> Or is there another method to detect that a connection has
> failed because of authentication?
You can supply a false wait option and then test yourself for a
successful connection.
There's also a timeout option, but it doesn't work as most people
would suspect. That could easily be called a bug.
Jim
--
Jim Fulton
More information about the ZODB-Dev
mailing list