From 7b77f400a1ecd0952376c8fb8607291465730370 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 1 Mar 2018 15:00:32 +0100 Subject: Fixed handling close of connections --- peerdemo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'peerdemo') diff --git a/peerdemo b/peerdemo index 3f0d5b19..8f2f70ff 100755 --- a/peerdemo +++ b/peerdemo @@ -75,7 +75,7 @@ while (1) { my $Request = ""; $fh->recv($Request, 1024); chomp($Request); - Log('<', $fh, $Request); + Log('<', $fh, $Request) if ($Request); if ($Request =~ /^CONN/) { Reply($fh, "250 OK"); ReportVDR($Request, $fh->peerhost()); @@ -89,8 +89,9 @@ while (1) { elsif ($Request =~ /^PING/) { Reply($fh, "250 $Name is alive"); } - elsif ($Request =~ /^QUIT/) { + elsif ($Request =~ /^QUIT/ || !$Request) { # close connection: + Log('<', $fh, "connection closed"); $SvdrpSelect->remove($fh); $fh->close; } -- cgit v1.2.3