diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-01 15:00:32 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-01 15:00:32 +0100 |
commit | 7b77f400a1ecd0952376c8fb8607291465730370 (patch) | |
tree | 02b536fecdcd3f5c319d24801300f3e28bc2de80 /peerdemo | |
parent | 4d7455e783e0fd4f37651e2bd6570d0468ca1cd0 (diff) | |
download | vdr-7b77f400a1ecd0952376c8fb8607291465730370.tar.gz vdr-7b77f400a1ecd0952376c8fb8607291465730370.tar.bz2 |
Fixed handling close of connections
Diffstat (limited to 'peerdemo')
-rwxr-xr-x | peerdemo | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |