Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Prevent duplicate incoming connections #4180

Merged
merged 1 commit into from
Jan 17, 2017

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Jan 16, 2017

No description provided.

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Jan 16, 2017
trace!(target: "network", "Rejected duplocate connection: {}", token);
session.lock().disconnect(io, DisconnectReason::DuplicatePeer);
return;
}
Copy link
Collaborator Author

@arkpar arkpar Jan 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condition block above is the only piece of new code. The rest is just juggling scopes.

session.token() != token && session.info.id == ready_id
});
if duplicate {
trace!(target: "network", "Rejected duplocate connection: {}", token);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "duplocate"

@arkpar arkpar force-pushed the network-prevent-dup-connections branch from 42a57e9 to c30de3a Compare January 16, 2017 17:11
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling c30de3a on network-prevent-dup-connections into ** on master**.

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 17, 2017
@arkpar arkpar merged commit 8852a05 into master Jan 17, 2017
@arkpar arkpar deleted the network-prevent-dup-connections branch January 17, 2017 15:02
arkpar added a commit that referenced this pull request Jan 18, 2017
gavofyork pushed a commit that referenced this pull request Jan 18, 2017
* Minor typo to ensure it updates only when synced. (#4188)

* Updater fixes (#4196)

* Minor typo to ensure it updates only when synced.

* Fix deadlock.

* Skip unneeded arg in making list.

* Allow auto-restart even when not running an update.

* Fix trace.

* Update update info on each loop.

* Fix build.

* Shutdown all sockets

* Remove superfluous use.

* Poll for upgrades as part of global status (long) (#4197)

* Poll for upgrades as part of global status (long)

* Fix path

* Prevent duplicate incoming connections (#4180)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants