absurdfarce opened a new pull request, #583:
URL: https://github.com/apache/cassandra-cpp-driver/pull/583

   Multiple steps to try to keep us out of the crash situation.  First: remove 
the call to the callback from the handler's on_close() function.  It's not 
especially useful when a connection is in the process of closing down like 
this; when that happens host up or host add events (the objective of the 
callback in question) should be considered unreliable anyway.  This change 
alone is _probably_ enough to fix the problem but it's effect there is entirely 
one of timing; by not having to handle the extra event delivery logic we're not 
taking as long in the callback so there's less opportunity to overlap with 
other resources being destructed.  That said, minimizing the amount of work 
here is still a pretty good idea.
   
   Second: don't make the on_close() function of the handler a pure virtual 
function.  There's no obvious reason this function has to be a _pure_ virtual 
function so the hope is that by giving it a (no-op) body we'll just execute 
that if we wind up with a conversion from a PrepareHostHandler to a 
ConnectionListener object while the event loop is shutting down.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to