Tanganelli / CoAPthon3

CoAPthon3 is a porting to python3 of my CoAPthon library. CoAPthon3 is a python3 library to the CoAP protocol compliant with the RFC. Branch is available for the Twisted framework.
MIT License
58 stars 50 forks source link

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

Open phc-1020 opened 7 months ago

phc-1020 commented 7 months ago

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.