Better handling of keep-alive requests
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 13 Feb 2016 22:49:38 +0000 (23:49 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Sat, 13 Feb 2016 22:49:38 +0000 (23:49 +0100)
nmrp.c

diff --git a/nmrp.c b/nmrp.c
index 5c6820c14f5a92e77fa570d698d76a35bcce078d..98a067faf36f6fa5287cf5aaa5671018aa8e1b98 100644 (file)
--- a/nmrp.c
+++ b/nmrp.c
@@ -586,6 +586,8 @@ int nmrp_do(struct nmrpd_args *args)
                                break;
                        case NMRP_C_KEEP_ALIVE_REQ:
                                tx.msg.code = NMRP_C_KEEP_ALIVE_ACK;
+                               ethsock_set_timeout(sock, 15000);
+                               printf("Received keep-alive request.\n");
                                break;
                        case NMRP_C_CLOSE_REQ:
                                tx.msg.code = NMRP_C_CLOSE_ACK;