From 793127e4a4c9a04d31a7708cc765e460c0d3f603 Mon Sep 17 00:00:00 2001 From: sgunderson Date: Tue, 9 Oct 2001 21:17:39 +0000 Subject: [PATCH] Fixed a problem where unknown commands would just cause the connection to hang, more or less (related to the numeric cleanups). --- cmds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmds.c b/cmds.c index 3c91790..e1fe248 100644 --- a/cmds.c +++ b/cmds.c @@ -1622,8 +1622,12 @@ void parse_command(struct conn *c) } } while ((++h)->callback != NULL); - numeric(c, 500, "Sorry, no such command."); remove_bytes(c, cmlen); + { + char error[] = "500 Sorry, no such command.\r\n"; + if (send(c->sock, error, strlen(error), 0) == -1 && errno == EPIPE) + destroy_conn(c); + } } /* -- 2.39.2