maidsafe-archive / MaidSafe-RUDP

Implementation of Reliable UDP
Other
95 stars 51 forks source link

Maid 286 assertion inside connect to bootstrap endpoint #34

Closed inetic closed 9 years ago

inetic commented 9 years ago

When Transport::ConnectToBootstrapEndpoint function was called, it started to wait on the on_connectionadded and on_connectionlost functors. The problem was, that these could have been called by any underlying Connections, not only the one we've just initiated inside the ConnectToBootstrapEndpoint function. What I've done is I added a OnConnect handler to Connection::Connect method so that the work we need to do will only happen as a response to events happening inside the particular Connection object.