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:
parent
4d7455e783
commit
7b77f400a1
5
peerdemo
5
peerdemo
@ -75,7 +75,7 @@ while (1) {
|
|||||||
my $Request = "";
|
my $Request = "";
|
||||||
$fh->recv($Request, 1024);
|
$fh->recv($Request, 1024);
|
||||||
chomp($Request);
|
chomp($Request);
|
||||||
Log('<', $fh, $Request);
|
Log('<', $fh, $Request) if ($Request);
|
||||||
if ($Request =~ /^CONN/) {
|
if ($Request =~ /^CONN/) {
|
||||||
Reply($fh, "250 OK");
|
Reply($fh, "250 OK");
|
||||||
ReportVDR($Request, $fh->peerhost());
|
ReportVDR($Request, $fh->peerhost());
|
||||||
@ -89,8 +89,9 @@ while (1) {
|
|||||||
elsif ($Request =~ /^PING/) {
|
elsif ($Request =~ /^PING/) {
|
||||||
Reply($fh, "250 $Name is alive");
|
Reply($fh, "250 $Name is alive");
|
||||||
}
|
}
|
||||||
elsif ($Request =~ /^QUIT/) {
|
elsif ($Request =~ /^QUIT/ || !$Request) {
|
||||||
# close connection:
|
# close connection:
|
||||||
|
Log('<', $fh, "connection closed");
|
||||||
$SvdrpSelect->remove($fh);
|
$SvdrpSelect->remove($fh);
|
||||||
$fh->close;
|
$fh->close;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user