Skip to content

Commit dcd3efd

Browse files
authored
Remove vsock consts (microsoft#1396)
They're defined in the vsock package we use, and we never used the CidAny const anywhere. Signed-off-by: Daniel Canter <dcanter@microsoft.com>
1 parent 8e6bea6 commit dcd3efd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

guest/transport/vsock.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ import (
1313
"github.com/sirupsen/logrus"
1414
)
1515

16-
//nolint:deadcode,varcheck
17-
const (
18-
vmaddrCidHost = 2
19-
vmaddrCidAny = 0xffffffff
20-
)
21-
2216
// VsockTransport is an implementation of Transport which uses vsock
2317
// sockets.
2418
type VsockTransport struct{}
@@ -36,7 +30,7 @@ func (t *VsockTransport) Dial(port uint32) (Connection, error) {
3630
// Retry 10 times because vsock.Dial can return connection time out
3731
// due to some underlying kernel bug.
3832
for i := 0; i < 10; i++ {
39-
conn, err := vsock.Dial(vmaddrCidHost, port)
33+
conn, err := vsock.Dial(vsock.CIDHost, port)
4034
if err == nil {
4135
return conn, nil
4236
}

0 commit comments

Comments
 (0)