1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling close of connections

This commit is contained in:
Klaus Schmidinger 2018-03-01 15:00:32 +01:00
parent 4d7455e783
commit 7b77f400a1

View File

@ -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;
}