On Sat, Jun 12, 2010 at 9:17 PM, Nitro <ni...@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
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to