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

On RST with empty response, transaction.response could be None #50

Open
phc-1020 opened this issue Feb 6, 2024 · 0 comments
Open

On RST with empty response, transaction.response could be None #50

phc-1020 opened this issue Feb 6, 2024 · 0 comments

Comments

@phc-1020
Copy link

phc-1020 commented Feb 6, 2024

During RST command, if the transaction response is empty, the field transaction.response may still be None. However, it is referenced at line 174 in file coapthon/layers/messagelayer.py, function receive_empty():
elif not transaction.response.acknowledged:
Suggestion: first check if transaction.response is not None:
elif (transaction.response is not None) and (not transaction.response.acknowledged):
This is exactly what is done in the case of the ACK command, at line 169 of the same file.

@phc-1020 phc-1020 changed the title On RST, transaction.response could be None On RST with empty response, transaction.response could be None Feb 6, 2024
phc-1020 added a commit to phc-1020/CoAPthon3 that referenced this issue Feb 9, 2024
phc-1020 added a commit to phc-1020/CoAPthon3 that referenced this issue Feb 12, 2024
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

No branches or pull requests

1 participant