From 8e470bc3663da4a5bbb771a4a6fbaf8a4cae224d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 29 Sep 2024 18:22:45 -0400 Subject: lib: net: Return 0 on peer disconnect Signed-off-by: Ian Moffett --- lib/net/frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/frame.c b/lib/net/frame.c index e037d1c..1f33b09 100644 --- a/lib/net/frame.c +++ b/lib/net/frame.c @@ -100,7 +100,7 @@ recv_frame(int client_fd, size_t len, const unsigned char *session_key, void *re } if (ret == 0) { printf("Connection closed by peer\n"); - return -1; + return 0; } /* Decrypt the payload */ -- cgit v1.2.3