Am 14.06.2010, 15:50 Uhr, schrieb Jim Fulton <j...@zope.com>:

> 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. :)

Ehehe, I guess everything is relative -- except me :)

>> 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.

Thanks for this answer, Jim. I'll try using the false wait option.

-Matthias
_______________________________________________
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