Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that DealerSocket has been broken after IBD. #311

Merged
merged 1 commit into from Jul 1, 2019

Conversation

Projects
None yet
3 participants
@longfin
Copy link
Member

commented Jun 28, 2019

This PR fixes a bug that Swarm had not dial to other peer after IBD. This is due to the fact that Swarm's internal DealerSocket doesn't connect properly after a certain period of time.

To solve this problem, every DialAsync() has been modified to close the previous DealerSocket and create a new DealerSocket.

@longfin longfin force-pushed the longfin:bugfix/fix-dial-after-ibd branch from 3fd3d8c to 90ed3cd Jun 28, 2019

@longfin longfin marked this pull request as ready for review Jun 29, 2019

@longfin

This comment has been minimized.

Copy link
Member Author

commented Jun 29, 2019

/rebase

@autorebase

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2019

The rebase failed:

Not Found

To rebase manually, run these commands in your terminal:

# Fetch latest updates from GitHub.
git fetch
# Create new working tree.
git worktree add .worktrees/rebase bugfix/fix-dial-after-ibd
# Navigate to the new directory.
cd .worktrees/rebase
# Rebase and resolve the likely conflicts.
git rebase --interactive --autosquash master
# Push the new branch state to GitHub.
git push --force
# Go back to the original working tree.
cd ../..
# Delete the working tree.
git worktree remove .worktrees/rebase

@longfin longfin force-pushed the longfin:bugfix/fix-dial-after-ibd branch from 90ed3cd to 9581619 Jun 29, 2019

@longfin longfin force-pushed the longfin:bugfix/fix-dial-after-ibd branch from 9581619 to f3b8df9 Jul 1, 2019

@codecov

This comment has been minimized.

Copy link

commented Jul 1, 2019

Codecov Report

Merging #311 into master will increase coverage by 0.05%.
The diff coverage is 80%.

@@            Coverage Diff             @@
##           master     #311      +/-   ##
==========================================
+ Coverage   87.34%   87.39%   +0.05%     
==========================================
  Files         189      189              
  Lines       12741    12744       +3     
==========================================
+ Hits        11129    11138       +9     
+ Misses       1361     1355       -6     
  Partials      251      251
Impacted Files Coverage Δ
Libplanet/Net/Swarm.cs 74.88% <80%> (-0.17%) ⬇️
Libplanet.Tests/Net/SwarmTest.cs 93.75% <0%> (+1.24%) ⬆️

@longfin longfin changed the title Fix bug that DealerSocket has been broken after IBD. Fix a bug that DealerSocket has been broken after IBD. Jul 1, 2019

@longfin longfin requested a review from dahlia Jul 1, 2019

@dahlia

dahlia approved these changes Jul 1, 2019

@longfin longfin merged commit dfa589b into planetarium:master Jul 1, 2019

15 of 16 checks passed

codecov/patch 80% of diff hit (target 87.34%)
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/project 87.39% (+0.05%) compared to 718cb33
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190701.2 succeeded
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.