diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-07-22 20:14:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-22 20:14:05 -0700 |
commit | bac3376278bfd8125879ca86e8eb26df85858d4c (patch) | |
tree | 8dec71c9deadf8c2138998a3cb6e93b3fec1c380 /vendor/golang.org/x/net/ipv6/payload_nocmsg.go | |
parent | 3539a9a60b24bd9c0c1360b17c8fe3e6ebf8cf3c (diff) | |
download | chat-bac3376278bfd8125879ca86e8eb26df85858d4c.tar.gz chat-bac3376278bfd8125879ca86e8eb26df85858d4c.tar.bz2 chat-bac3376278bfd8125879ca86e8eb26df85858d4c.zip |
Updating dependencies (#9139)
Diffstat (limited to 'vendor/golang.org/x/net/ipv6/payload_nocmsg.go')
-rw-r--r-- | vendor/golang.org/x/net/ipv6/payload_nocmsg.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vendor/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go index 99a43542b..459142d26 100644 --- a/vendor/golang.org/x/net/ipv6/payload_nocmsg.go +++ b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go @@ -2,14 +2,11 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build nacl plan9 windows +// +build js nacl plan9 windows package ipv6 -import ( - "net" - "syscall" -) +import "net" // ReadFrom reads a payload of the received IPv6 datagram, from the // endpoint c, copying the payload into b. It returns the number of @@ -17,7 +14,7 @@ import ( // src of the received datagram. func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { if !c.ok() { - return 0, nil, nil, syscall.EINVAL + return 0, nil, nil, errInvalidConn } if n, src, err = c.PacketConn.ReadFrom(b); err != nil { return 0, nil, nil, err @@ -32,7 +29,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net. // cm may be nil if control of the outgoing datagram is not required. func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { if !c.ok() { - return 0, syscall.EINVAL + return 0, errInvalidConn } if dst == nil { return 0, errMissingAddress |