Commit 2dc95357 authored by Robin Obůrka's avatar Robin Obůrka Committed by Robin Obůrka

msgloop: Consider generated message in in-olny box as programmer error

parent 173db4c6
......@@ -84,10 +84,13 @@ def _sn_main_loop(box_name, user_data, socket_recv, socket_send, setup=None, pro
def process_result(socket_send, result):
if not result or not socket_send:
if not result:
# The box is output-only or it hasn't any reasonable answer
return
if not socket_send:
raise sn.LoopError("Box generated output but there is any output socket. Bad configuration?")
try:
msg_type, payload = result
msg_out = sn.encode_msg(msg_type, payload)
......
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