MCPcopy Create free account
hub / github.com/attermann/microReticulum / on_link_closed

Function on_link_closed

test_interop/python_link_receiver.py:65–77  ·  view source on GitHub ↗
(link)

Source from the content-addressed store, hash-verified

63
64
65def on_link_closed(link):
66 r = link.teardown_reason
67 if state["pass"] == 1:
68 print(f"[python] pass1 link closed: teardown_reason={reason_name(r)}",
69 flush=True)
70 state["pass1_closed_reason"] = r
71 # Roll the phase counter forward; next link establishment is pass 2.
72 state["pass"] = 2
73 state["current_link"] = None
74 elif state["pass"] == 2:
75 print(f"[python] pass2 link closed: teardown_reason={reason_name(r)}",
76 flush=True)
77 state["pass2_closed_reason"] = r
78
79
80def write_config(config_dir: str, port: int) -> None:

Callers

nothing calls this directly

Calls 1

reason_nameFunction · 0.70

Tested by

no test coverage detected