| 250 | } |
| 251 | |
| 252 | void LeaseSetDestination::SetLeaseSet (std::shared_ptr<const i2p::data::LocalLeaseSet> newLeaseSet) |
| 253 | { |
| 254 | { |
| 255 | std::lock_guard<std::mutex> l(m_LeaseSetMutex); |
| 256 | m_LeaseSet = newLeaseSet; |
| 257 | } |
| 258 | i2p::garlic::GarlicDestination::SetLeaseSetUpdated (); |
| 259 | if (m_IsPublic) |
| 260 | { |
| 261 | auto s = shared_from_this (); |
| 262 | boost::asio::post (m_Service, [s](void) |
| 263 | { |
| 264 | s->m_PublishVerificationTimer.cancel (); |
| 265 | s->Publish (); |
| 266 | }); |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | void LeaseSetDestination::UpdateLeaseSet () |
| 271 | { |