You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem is for CoAP client, when client use domain as server host, it will cause unmatched incoming response problem.
For example, when test in local:
from coapthon.client.helperclient import HelperClient
client = HelperClient(('localhost', 5683))
respones=client.get('temp')
the log output:
2019-11-03 01:02:17,459:WARNING:Un-Matched incoming response message 127.0.0.1:5683
if change localhost to 127.0.0.1, there is no issue.
I find out that problem is the hash function take host and port as parameters, when you send request, you take 'localhost' as host to compute hash, when you receive the response, you take '127.0.0.1' as host to compute again. Of course is different and unmatched.
This issue can be addressed by directly converting input server(domain, port) to (ip, port)
I have made a pull request to this issue and also add ping function into HelperClient, hope it works, thank you.
The text was updated successfully, but these errors were encountered:
This problem is for CoAP client, when client use domain as server host, it will cause unmatched incoming response problem.
For example, when test in local:
the log output:
2019-11-03 01:02:17,459:WARNING:Un-Matched incoming response message 127.0.0.1:5683
if change localhost to 127.0.0.1, there is no issue.
I find out that problem is the hash function take host and port as parameters, when you send request, you take 'localhost' as host to compute hash, when you receive the response, you take '127.0.0.1' as host to compute again. Of course is different and unmatched.
This issue can be addressed by directly converting input server(domain, port) to (ip, port)
I have made a pull request to this issue and also add ping function into HelperClient, hope it works, thank you.
The text was updated successfully, but these errors were encountered: