Commit bf730fac authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed unknown labels consumption

parent 8478a8f3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ import socket
import logging

from sjrpc.core.protocols.rpc import RpcProtocol
from sjrpc.core.protocols import Protocol
from sjrpc.core.exceptions import RpcError

import pyev
@@ -196,6 +197,12 @@ class RpcConnection(object):

                # Get the registered protocol for the specified label
                self._proto_receiving = self._protocols.get(label)

                # If frame's label is not binded to a protocol, we create a
                # dummy protocol to consume the payload:
                if self._proto_receiving is None:
                    self._proto_receiving = Protocol(self, -1)

                self._proto_receiving.start_message(pl_size)
                self._inbound_buffer = ''
                self._remains = pl_size