Remove self connection on peer discovery (#269)

* Resetting last shard syncing flags when sync is abandoned. (#268)

* Remove self loopback connection when self is added by peer discovery

* Resolved PR comments

Co-authored-by: Savinda Senevirathne <savindadilsara@gmail.com>
This commit is contained in:
Chalith Desaman
2021-03-12 19:01:58 +05:30
committed by GitHub
parent af4c9df9dc
commit 9999c28a37
3 changed files with 29 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ namespace p2p::self
// Holds self messages waiting to be processed.
moodycamel::ConcurrentQueue<std::string> msg_queue;
std::optional<conf::peer_ip_port> ip_port;
/**
* Processes the next queued message (if any).
* @return 0 if no messages in queue. 1 if message was processed successfully. -1 on error.