1 | // Copyright 2022 The Go Authors. All rights reserved. |
---|---|
2 | // Use of this source code is governed by a BSD-style |
3 | // license that can be found in the LICENSE file. |
4 | |
5 | //go:build go1.16 |
6 | // +build go1.16 |
7 | |
8 | package jsonrpc2 |
9 | |
10 | import ( |
11 | "errors" |
12 | "net" |
13 | ) |
14 | |
15 | var errClosed = net.ErrClosed |
16 | |
17 | func isErrClosed(err error) bool { |
18 | return errors.Is(err, errClosed) |
19 | } |
20 |