Commit bf730fac authored by Antoine Millet's avatar Antoine Millet

Fixed unknown labels consumption

parent 8478a8f3
......@@ -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._inbound_buffer = ''
self._remains = pl_size
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment