Opened 17 years ago

Last modified 17 years ago

#189 defect closed fixed (fixed)

PB or SSL error handling tiny small bug in specific cases

Reported by: Ben Owned by:
Priority: high Milestone:
Component: pb Keywords:
Cc: itamarst, Ben Branch:


Change History (5)

comment:1 Changed 17 years ago by Ben

When one reactor.connectSSL to a port where something else
than a well working SSL server is running, the
Broker.connectionLost gets called before the
Broker.connection_ready. The consequence of this is
PB.connectionLost tries to loop through the
self.remotelyCachedObjects.values which were never set (get
set in connection_ready)

So either it is a problem with SSL not handling well wrong
protocols by calling connectionLost without first calling
connection_ready OR Broker wrongly assumes that.

I my specific case I had used by mistake the
ClientContextFactory on the server. Getting the error that
remotelyCachedObjects does not exist as an attribute of
Broker, instead of having the normal errback calls is VERY

comment:2 Changed 17 years ago by Ben

forgot to say I used 1.0.7alpha4

comment:3 Changed 17 years ago by itamarst

I suspect what happens is, TCP connection is made, so
protocol instance created, even though ssl negotiaion isn't
done. Then it fails. I think the solution is to only do
tcp.Client._connectDone when ssl succeeds. Probably this
means adding a check in the doRead for ssl.Client.

comment:4 Changed 17 years ago by itamarst

Looks like it's impossible to make SSL connections do the
right thing (and in any case there's always the case where's
it's going to fail) so the real solution is to fix PB's

comment:5 Changed 9 years ago by <automation>

Note: See TracTickets for help on using tickets.