authentication failure just hanging...

#1

I’ve been playing around with authentication, specifically wampcra on the twisted side of the fence. When I fire up a router that does authentication (examples/twisted/wamp/authentication/wampcra/server.py) my examples/twisted/wamp/basic/rpc/timeservice/backend.py just hangs when I try to start it up. I can get it to exit correctly by adding:

+from twisted.internet import reactor

then in the Component class:

  • def onDisconnect(self):

  •  print("disconnected")
    
  •  reactor.stop()
    

This is a programming bug on my end, my backend.py was not correctly coded up to deal with authentication. When I try it with the frontend.py from the same directory it exits correctly with the authentication failure.

I’m thinking that even though I made a programming error, the execution of backend.py should exit. I guess it doesn’t because the ApplicationSession superclass doesn’t have the onDisconnect(self): reactor.stop() code in it. Should it?

-g

0 Likes