1
0
mirror of https://github.com/golang/go synced 2024-11-24 00:50:10 -07:00
go/src/net/error_windows.go
Ian Lance Taylor 7f6105f138 net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept
Updates #6163
Fixes #24808

Change-Id: I4f5c686ebf60f72f71f566199ee3e946076202bb
Reviewed-on: https://go-review.googlesource.com/110439
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-01 14:50:33 +00:00

15 lines
355 B
Go

// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package net
import "syscall"
func isConnError(err error) bool {
if se, ok := err.(syscall.Errno); ok {
return se == syscall.WSAECONNRESET || se == syscall.WSAECONNABORTED
}
return false
}