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 a bug in the sendrecv method when using multi-threading #417

Merged
merged 2 commits into from
Dec 23, 2016

Conversation

p-l-
Copy link
Member

@p-l- p-l- commented Dec 23, 2016

This is #267 with conflicts fixed + cleanup.
Fixes #267.

@p-l- p-l- added the bug label Dec 23, 2016
@@ -140,6 +140,8 @@ def sndrcv(pks, pkt, timeout = None, inter = 0, verbose=None, chainCC=0, retry=0
inp = []
try:
inp, out, err = select(inmask,[],[], remaintime)
except error as e:
Copy link
Member

@gpotter2 gpotter2 Dec 23, 2016

Choose a reason for hiding this comment

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

I don't really like continuing like that, as select.error can be differents errors... That's typically a place where bugs will hide

As the select.error is something like
(4, 'Interrupted system call')
Couldn't we check if the error is 4, and if so continue, otherwise raise ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I created the PR but had not finished my changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually it's better to merge with the next except statement.

@p-l-
Copy link
Member Author

p-l- commented Dec 23, 2016

Failure on AppVeyor seems to be related to... AppVeyor ("Maximum number of retries (3) exceeded while executing database operations with 'SqlAzureExecutionStrategy'. See inner exception for the most recent failure."). Just re-launched a new build.

@Rcarnus
Copy link
Contributor

Rcarnus commented Dec 23, 2016

@p-l- Yes thanks this fixes the bug.

@p-l- p-l- merged commit 2a60580 into secdev:master Dec 23, 2016
@p-l- p-l- deleted the Romounet-srfix branch December 23, 2016 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants