mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 11:00:25 +00:00
diagnostics: listen on both TCP/IP and vsock ports
The TCP/IP port will be used by Windows, while Mac can use the vsock one. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
15b772d496
commit
184fa38903
@ -10,6 +10,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
"time"
|
||||
"github.com/djs55/vsock"
|
||||
)
|
||||
|
||||
func run(timeout time.Duration, w *tar.Writer, command string, args ...string) {
|
||||
@ -108,6 +109,12 @@ func main() {
|
||||
} else {
|
||||
listeners = append(listeners, ip)
|
||||
}
|
||||
vsock, err := vsock.Listen(uint(62374))
|
||||
if err != nil {
|
||||
log.Printf("Failed to bind to vsock port 62374: %#v", err)
|
||||
} else {
|
||||
listeners = append(listeners, vsock)
|
||||
}
|
||||
|
||||
for _, l := range listeners {
|
||||
go func(l net.Listener) {
|
||||
|
Loading…
Reference in New Issue
Block a user