Actually bail out after sending CLOSE_REQ
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Tue, 9 Aug 2016 10:21:10 +0000 (12:21 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Tue, 9 Aug 2016 10:21:10 +0000 (12:21 +0200)
nmrp.c

diff --git a/nmrp.c b/nmrp.c
index fbb4cea00f967d6b9ed91e44fe99cf3d214fd65c..59938db152607e4882100f96d8800dcc2c772ff3 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -679,6 +679,10 @@ int nmrp_do(struct nmrpd_args *args)
                                perror("sendto");
                                goto out;
                        }
+
+                       if (tx.msg.code == NMRP_C_CLOSE_REQ) {
+                               goto out;
+                       }
                }
 
                if (rx.msg.code == NMRP_C_CLOSE_REQ) {