Skip to content

Commit

Permalink
fix(api): home view snapshots with npipe
Browse files Browse the repository at this point in the history
  • Loading branch information
olljanat committed Jul 18, 2018
1 parent 108026c commit 986fb66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/docker/client.go
Expand Up @@ -35,13 +35,13 @@ func (factory *ClientFactory) CreateClient(endpoint *portainer.Endpoint) (*clien
return createAgentClient(endpoint, factory.signatureService)
}

if strings.HasPrefix(endpoint.URL, "unix://") {
return createUnixSocketClient(endpoint)
if strings.HasPrefix(endpoint.URL, "unix://") || strings.HasPrefix(endpoint.URL, "npipe://") {
return createLocalClient(endpoint)
}
return createTCPClient(endpoint)
}

func createUnixSocketClient(endpoint *portainer.Endpoint) (*client.Client, error) {
func createLocalClient(endpoint *portainer.Endpoint) (*client.Client, error) {
return client.NewClientWithOpts(
client.WithHost(endpoint.URL),
client.WithVersion(portainer.SupportedDockerAPIVersion),
Expand Down
2 changes: 1 addition & 1 deletion api/http/handler/websocket/websocket_exec_windows.go
Expand Up @@ -5,7 +5,7 @@ package websocket
import (
"net"

"github.com/Microsoft/go-winio"
"github.com/olljanat/go-winio"
)

func createWinDial(host string) (net.Conn, error) {
Expand Down

0 comments on commit 986fb66

Please sign in to comment.