summaryrefslogtreecommitdiff
path: root/tests/LightyTest.pm
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-02-03 16:19:13 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:34 -0400
commit651e0d216c0c67051f2b3e15ecb998333b9fb91e (patch)
treed91ca825f40cb3d51ca81fd97ef0e92488619291 /tests/LightyTest.pm
parenta3bf0cd22e09a41a595f090e940b3485827af65d (diff)
downloadlighttpd-git-651e0d216c0c67051f2b3e15ecb998333b9fb91e.tar.gz
[core] _WIN32 prefer WSAPoll()
Note: TCP half-close is reported by WSAPoll() as POLLHUP event. (e.g. TCP half-close from shutdown(fd, SHUT_WR)) TODO: If performance tests of select() vs WSAPoll() do not show a a measurable difference, select() may be preferred over WSAPoll(). For now, make both "poll" and "select" available options in _WIN32. (On other platforms, lighttpd build does not built code to use select() when poll() is available on the platform.)
Diffstat (limited to 'tests/LightyTest.pm')
-rw-r--r--tests/LightyTest.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm
index f87ef4f3..c55aa601 100644
--- a/tests/LightyTest.pm
+++ b/tests/LightyTest.pm
@@ -361,7 +361,10 @@ sub handle_http {
print $remote "\012";
}
}
- shutdown($remote, 1) if ($^O ne "openbsd" && $^O ne "dragonfly"); # I've stopped writing data
+ if ($^O ne "openbsd" && $^O ne "dragonfly" && !$self->{"win32native"}) {
+ # (avoid on OS where TCP half-close may be reported as POLLHUP)
+ shutdown($remote, 1); # I've stopped writing data
+ }
diag("\n... done") if $is_debug;
my $lines = "";