Skip to content

Commit

Permalink
Add check for /dev/vsock and fix wrong variable name
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Fox <[email protected]>
  • Loading branch information
kfox1111 committed Jan 7, 2025
1 parent 0c2e86f commit 4f6772c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/peertracker/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import (
)

func (lf *ListenerFactory) ListenVSock(port uint32) (*Listener, error) {
if lf.NewUnixListener == nil {
if _, err := os.Stat("/dev/vsock"); err != nil {

Check failure on line 8 in pkg/peertracker/trace.go

View workflow job for this annotation

GitHub Actions / goreleaser

undefined: os
return nil, err
}
if lf.NewVSockListener == nil {
lf.NewVSockListener = vsock.Listen
}
if lf.NewTracker == nil {
Expand Down

0 comments on commit 4f6772c

Please sign in to comment.