From 97d1ff859b42836eeb5629018a4be11e3755edc2 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 25 Feb 2017 13:12:56 -0800 Subject: [PATCH] logic bug: M.S4B.close() must not re-send RELEASE --- docs/mailbox_close.dot | 4 +++- src/wormhole/_mailbox.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/mailbox_close.dot b/docs/mailbox_close.dot index 6765d84..b4daeba 100644 --- a/docs/mailbox_close.dot +++ b/docs/mailbox_close.dot @@ -27,6 +27,8 @@ digraph { SrcA -> Prc [label="connected"] Prc [shape="box" label="C.tx_release\nC.tx_close" color="orange"] Prc -> SrcB [color="orange"] + Prc2 [shape="box" label="C.tx_close" color="orange"] + Prc2 -> SrcB [color="orange"] SrcB [label="SrcB:\nwaiting for:\nrelease\nclosed" color="orange"] SrcB -> SrcA [label="lost"] SrcB -> ScB [label="rx_released" color="orange" fontcolor="orange"] @@ -65,7 +67,7 @@ digraph { S4A [label="S4A" style="dashed"] S4B [label="S4B" color="orange" style="dashed"] S4A -> SrcA [style="dashed"] - S4B -> Prc [color="orange" style="dashed"] + S4B -> Prc2 [color="orange" style="dashed"] S5A [label="S5A" style="dashed"] S5B [label="S5B" color="green" style="dashed"] diff --git a/src/wormhole/_mailbox.py b/src/wormhole/_mailbox.py index 16dd882..628d40d 100644 --- a/src/wormhole/_mailbox.py +++ b/src/wormhole/_mailbox.py @@ -263,8 +263,7 @@ class Mailbox(object): S3B.upon(close, enter=SrcB, outputs=[record_mood_and_RC_tx_release_and_RC_tx_close]) S4A.upon(close, enter=SrcA, outputs=[record_mood]) - S4B.upon(close, enter=SrcB, - outputs=[record_mood_and_RC_tx_release_and_RC_tx_close]) + S4B.upon(close, enter=SrcB, outputs=[record_mood_and_RC_tx_close]) S5A.upon(close, enter=ScA, outputs=[record_mood]) S5B.upon(close, enter=ScB, outputs=[record_mood_and_RC_tx_close])