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

stop old neighbor thread if neighbor re-added (full credit to @Leibi133) #432

Closed
wants to merge 3 commits into from

Conversation

alon-e
Copy link
Contributor

@alon-e alon-e commented Dec 22, 2017

@Leibi133 's comment formatted as a Pull Request
fixes #345

@alon-e
Copy link
Contributor Author

alon-e commented Dec 22, 2017

what if neighbors are replaced with other neighbors,
this fix won't resolve that.

  1. while removeNeighbor() closes the (Source & Sink) sockets, the thread keeps on running (same as while loop as touched here)

  2. the HashMap keeps references to dead threads. so memory would not be freed by GC (?).

@bahamapascal
Copy link

Have made a test run over the last 24 hours and it's working great and smooth!

@alon-e
Copy link
Contributor Author

alon-e commented Jan 5, 2018

merged but didn't close automatically.

@alon-e alon-e closed this Jan 5, 2018
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.

Repeated adding/removing of neighbors brakes TCP connection
3 participants