aboutsummaryrefslogtreecommitdiff
path: root/tcp_windows.go
diff options
context:
space:
mode:
authorGravatar ArminBTVS <98586621+ArminBTVS@users.noreply.github.com> 2022-03-14 10:53:16 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-14 10:53:16 +0100
commit1a5f2f40c6a75d42c5c5935efc73f79644cd5b73 (patch)
tree96fcff0fa6f774b124b7ffb23e422731377f15b4 /tcp_windows.go
parentUpdate github.com/klauspost/compress (#1237) (diff)
downloadfasthttp-1a5f2f40c6a75d42c5c5935efc73f79644cd5b73.tar.gz
fasthttp-1a5f2f40c6a75d42c5c5935efc73f79644cd5b73.tar.bz2
fasthttp-1a5f2f40c6a75d42c5c5935efc73f79644cd5b73.zip
Read response when client closes connection #1232 (#1233)
* Read response when client closes connection #1232 * Fix edge case were client responds with invalid header * Follow linter suggestions for tests * Changes after review * Reafactor error check after review * Handle connection reset on windows * Remove format string from test where not needed * Run connection reset tests not on Windows
Diffstat (limited to 'tcp_windows.go')
-rw-r--r--tcp_windows.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/tcp_windows.go b/tcp_windows.go
new file mode 100644
index 0000000..5c33025
--- /dev/null
+++ b/tcp_windows.go
@@ -0,0 +1,13 @@
+//go:build windows
+// +build windows
+
+package fasthttp
+
+import (
+ "errors"
+ "syscall"
+)
+
+func isConnectionReset(err error) bool {
+ return errors.Is(err, syscall.WSAECONNRESET)
+}