Fix connection reply bug

Now, packet ids are always strings, except for self._pid.
This commit is contained in:
Joscha 2017-09-03 12:27:28 +00:00
parent 676f9d395b
commit 34e1ae4b8f

View file

@ -49,10 +49,10 @@ class Connection:
if self.stopped:
raise ConnectionClosed
pid = self._new_pid()
pid = str(self._new_pid())
packet = {
"type": ptype,
"id": str(pid)
"id": pid
}
if data:
packet["data"] = data