~mdkcore/jackplug

b1a3f02d22786128969b401893b95d0626b46d7e — Rodrigo Oliveira 4 years ago f0c3e84
PA-2589 - Do not encode service name while sending message

This is not necessary anymore, as minimal python version is now 2.7.
2 files changed, 2 insertions(+), 3 deletions(-)

M jackplug/jack.py
M jackplug/plug.py
M jackplug/jack.py => jackplug/jack.py +1 -1
@@ 42,7 42,7 @@ class JackBase(object):

        self.socket = self.context.socket(zmq.DEALER)
        self._identity = str(uuid.uuid4())
        self.socket.identity = service.encode("ascii")
        self.socket.identity = service.encode()

        # use with flags=zmq.DONTWAIT on send; also, any new message sent after
        # reaching HWM will be discarded (dealer)

M jackplug/plug.py => jackplug/plug.py +1 -2
@@ 163,8 163,7 @@ class PlugBase(object):
        if self.socket.closed:
            return

        self.socket.send_multipart([service.encode("ascii"),
                                    jsonapi.dumps(message)])
        self.socket.send_multipart([service, jsonapi.dumps(message)])

    def start(self):
        """Initialize all plug loopers"""