Skip to content
Snippets Groups Projects
Commit d1ac85e7 authored by Sergey Joseph Ivanov's avatar Sergey Joseph Ivanov
Browse files

handle timeout

parent 869c64ae
No related branches found
No related tags found
No related merge requests found
......@@ -128,12 +128,17 @@ sub handler {
$banner =~ s/([^\s\d\w.,;\/\\])/sprintf "\\%o", $1/eg;
}
}
close($h);
return {
elsif (not defined($fd)) {
close($h);
return { 'status' => ['connection timeout', 's'] };
}
else {
close($h);
return {
'banner' => [$banner, 's'],
'status' => ['connection successful', 's']
};
};
}
};
1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment