MCPcopy Create free account
hub / github.com/SamNet-dev/snix / IsHandleClosed

Function IsHandleClosed

platform/windows/windivert_api.go:187–196  ·  view source on GitHub ↗

IsHandleClosed reports whether err is the expected graceful signal ("WinDivert handle was closed") that Recv returns after Close().

(err error)

Source from the content-addressed store, hash-verified

185// IsHandleClosed reports whether err is the expected graceful signal
186// ("WinDivert handle was closed") that Recv returns after Close().
187func IsHandleClosed(err error) bool {
188 if err == nil {
189 return false
190 }
191 var en windows.Errno
192 if !errors.As(err, &en) {
193 return false
194 }
195 return en == errnoNoData
196}
197
198// translateErr keeps the Errno value but adds human-readable context when
199// the common codes appear. Makes driver-missing diagnostics obvious.

Callers 1

recvLoopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected