Skip to content

Commit

Permalink
Fix error handling in memifproxy (networkservicemesh#403)
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
  • Loading branch information
Vladimir Popov authored Oct 12, 2021
1 parent 4765584 commit 792a420
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ func (p *proxyListener) accept() {
defer func() { _ = p.Close() }()
for {
in, err := p.listener.Accept()
if optErr, ok := err.(*net.OpError); ok && !optErr.Temporary() {
if optErr, ok := err.(*net.OpError); !ok || !optErr.Temporary() {
// TODO - perhaps log this?
return
}
out, err := net.Dial(memifNetwork, p.socketFilename)
if optErr, ok := err.(*net.OpError); ok && !optErr.Temporary() {
if optErr, ok := err.(*net.OpError); !ok || !optErr.Temporary() {
_ = in.Close()
// TODO - perhaps log this?
return
Expand Down

0 comments on commit 792a420

Please sign in to comment.