Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

PeerPool removePeer should allow code or reason as parameter - Closes #4083 #4086

Merged
merged 7 commits into from
Aug 16, 2019

Conversation

jondubois
Copy link
Contributor

@jondubois jondubois commented Aug 14, 2019

What was the problem?

The logs did not show the disconnect reason most of the time.

How did I solve it?

If the status reason is not provided by the other side of the socket, then use the default reason for that code from SocketCluster if it exists.

How to manually test it?

Run tests and check against testnet.

Review checklist

Copy link
Contributor

@mitsuaki-u mitsuaki-u left a comment

Choose a reason for hiding this comment

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

Code looks good but we should also do the following: 1. removePeer function in PeerPool should be modified to include reason 2. reason should be added to the removePeer calls in evictPeer and removeAllPeers

@jondubois
Copy link
Contributor Author

@mitsujutsu Ready to review.

@shuse2 shuse2 merged commit e1d0155 into release/2.3.0 Aug 16, 2019
@shuse2 shuse2 deleted the 4083-improve_reason_logging branch August 16, 2019 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants