mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
unix: return ECONNREFUSE if a socket file exists but a socket isn't bound to it
PiperOrigin-RevId: 328843560
This commit is contained in:
@@ -783,6 +783,9 @@ func (fs *filesystem) BoundEndpointAt(ctx context.Context, rp *vfs.ResolvingPath
|
||||
}
|
||||
switch impl := d.inode.impl.(type) {
|
||||
case *socketFile:
|
||||
if impl.ep == nil {
|
||||
return nil, syserror.ECONNREFUSED
|
||||
}
|
||||
return impl.ep, nil
|
||||
default:
|
||||
return nil, syserror.ECONNREFUSED
|
||||
|
||||
Reference in New Issue
Block a user