Skip to content

Handle errors on PDU payload retrieval#170

Merged
eigenein merged 1 commit intopython-smpplib:masterfrom
stefanruijsenaars:patch-1
Oct 19, 2021
Merged

Handle errors on PDU payload retrieval#170
eigenein merged 1 commit intopython-smpplib:masterfrom
stefanruijsenaars:patch-1

Conversation

@stefanruijsenaars
Copy link
Contributor

Perform the same checks that we do on other calls to socket.recv()/socket.send(), lest we ever end up in an infinite loop whenever recv() returns a 0 length value.

@stefanruijsenaars
Copy link
Contributor Author

For reference, the while loop was only introduced recently: #82

@Lynesth
Copy link
Contributor

Lynesth commented Oct 11, 2021

I think line 259 is meant to say

            if not raw_pdu_part:

Also since we're repeating the exact same pattern as above, it might be a good idea to factorize it into its own function ?

@eigenein eigenein merged commit 677fb91 into python-smpplib:master Oct 19, 2021
@eigenein
Copy link
Collaborator

Thanks @stefanruijsenaars!

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.

3 participants