mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-14 01:56:52 +02:00
fixed race condition for publishing
This commit is contained in:
parent
0fbf552e95
commit
8ec12a1b65
3 changed files with 22 additions and 14 deletions
|
@ -127,7 +127,7 @@ namespace client
|
|||
|
||||
protected:
|
||||
|
||||
void SetLeaseSet (i2p::data::LocalLeaseSet * newLeaseSet);
|
||||
void SetLeaseSet (std::shared_ptr<const i2p::data::LocalLeaseSet> newLeaseSet);
|
||||
int GetLeaseSetType () const { return m_LeaseSetType; };
|
||||
void SetLeaseSetType (int leaseSetType) { m_LeaseSetType = leaseSetType; };
|
||||
virtual void CleanupDestination () {}; // additional clean up in derived classes
|
||||
|
@ -139,6 +139,7 @@ namespace client
|
|||
|
||||
void Run ();
|
||||
void UpdateLeaseSet ();
|
||||
std::shared_ptr<const i2p::data::LocalLeaseSet> GetLeaseSetMt ();
|
||||
void Publish ();
|
||||
void HandlePublishConfirmationTimer (const boost::system::error_code& ecode);
|
||||
void HandlePublishVerificationTimer (const boost::system::error_code& ecode);
|
||||
|
@ -164,7 +165,7 @@ namespace client
|
|||
|
||||
std::shared_ptr<i2p::tunnel::TunnelPool> m_Pool;
|
||||
std::mutex m_LeaseSetMutex;
|
||||
std::shared_ptr<i2p::data::LocalLeaseSet> m_LeaseSet;
|
||||
std::shared_ptr<const i2p::data::LocalLeaseSet> m_LeaseSet;
|
||||
bool m_IsPublic;
|
||||
uint32_t m_PublishReplyToken;
|
||||
uint64_t m_LastSubmissionTime; // in seconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue