Merge branch 'master' into development

This commit is contained in:
Giacomo Tanganelli 2021-03-20 17:25:02 +01:00 committed by GitHub
commit c478d14b9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -178,7 +178,7 @@ class CoAP(object):
if opt.value == 26:
return
if self._receiver_thread is None or not self._receiver_thread.isAlive():
if self._receiver_thread is None or not self._receiver_thread.is_alive():
self._receiver_thread = threading.Thread(target=self.receive_datagram)
self._receiver_thread.daemon = True
self._receiver_thread.start()

View file

@ -127,7 +127,7 @@ class Message(object):
self._token = value
return
if not isinstance(value, bytes):
value = bytes(value)
value = bytes(value, 'utf-8')
if len(value) > 256:
raise AttributeError