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

Fixed proper exit of a peer after removal from peer_list #105

Merged
merged 1 commit into from
Apr 5, 2016

Conversation

grakshith
Copy link
Contributor

We receive a negative chunk number whenever there is a socket timeout (process_next_message() function). However in line 479, we keep on waiting for the chunks whenever there is a negative chunk number.
If the splitter removes a particular peer from the peer_list, the splitter no longer sends the chunks to the peer , so do the other peers.
Also, since this is a UDP socket, there might be packet losses.

Hence, technically the peer will never get to know if the socket timeout is because of UDP or because it was removed from the peer_list.

One way to resolve this issue is to wait for a certain amount of time before stopping the peer thread.
I have chosen this time interval as 15 seconds. This can be modified as required.

@vicente-gonzalez-ruiz
Copy link
Member

Hi @hehaichi, thanks for your PR. It has been accepted.

Unfortunately, the Python version of the core is not going to be maintained any more (only the C++ version will be). We don't want to have the same functionality written in two different languages. In fact, the Python version of the archives should have been removed from the repository. Apologize for not having done that :-/

However, Python will be part of this project (probably for all the new/experimental code) and in order to continue developing with this language, the core is being provided with a Python wrapper.

Thanks again!
Vicente.

@vicente-gonzalez-ruiz vicente-gonzalez-ruiz merged commit 08efe90 into P2PSP:master Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants