Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/skirk/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func existingDefaultKitDir() (string, bool, error) {
return "", false, absErr
}
return kitDir, true, nil
} else if err != nil && !os.IsNotExist(err) {
} else if !os.IsNotExist(err) {
return "", false, err
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/skirk/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func uninstallWireproxy(ctx context.Context) error {
}
fmt.Printf("Removed wireproxy path: %s\n", defaultWireproxyDir)
removed = true
} else if err != nil && !os.IsNotExist(err) {
} else if !os.IsNotExist(err) {
return err
}
for _, path := range []string{defaultWireproxyBin, defaultWGCFBin} {
Expand All @@ -303,7 +303,7 @@ func uninstallWireproxy(ctx context.Context) error {
fmt.Printf("Removed wireproxy path: %s\n", defaultWireproxyDir)
fmt.Println("Wireproxy helper binaries left untouched because the Skirk ownership manifest is absent.")
removed = true
} else if err != nil && !os.IsNotExist(err) {
} else if !os.IsNotExist(err) {
return err
}
if !removed {
Expand Down
3 changes: 0 additions & 3 deletions internal/skirk/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ func TestConfigRejectsExperimentalTransport(t *testing.T) {
if err := cfg.Validate(); err == nil || !strings.Contains(err.Error(), "muxv4") {
t.Fatalf("err = %v, want transport validation error mentioning muxv4", err)
}
if got := normalizeMuxTransport(cfg.Tunnel.Transport); got != "muxv4" {
t.Fatalf("normalizeMuxTransport(experimental) = %q, want muxv4", got)
}
}

func TestAccessTokenSourceRefreshesBeforeExpiry(t *testing.T) {
Expand Down
8 changes: 2 additions & 6 deletions internal/skirk/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func newDriveMux(t *Tunnel, role string, sendDir, recvDir byte) (*driveMux, erro
sendDir: sendDir,
recvDir: recvDir,
epoch: epoch,
transport: normalizeMuxTransport(t.Transport),
transport: "muxv4",
streams: map[muxStreamKey]*muxStream{},
opening: map[muxStreamKey]struct{}{},
closed: map[muxStreamKey]time.Time{},
Expand Down Expand Up @@ -388,10 +388,6 @@ func newMuxLane(m *driveMux, idx int) *muxLane {
}
}

func normalizeMuxTransport(transport string) string {
return "muxv4"
}

func (t *Tunnel) serveMuxClient(ctx context.Context, listen string) error {
t.role = "client"
if strings.TrimSpace(t.ClientID) == "" || strings.TrimSpace(t.RunID) == "" {
Expand Down Expand Up @@ -2724,7 +2720,7 @@ func normalReceivePauseStateForStream(stream *muxStream) (bool, bool) {
}
frames, bytes := stream.reassemblyBacklog()
reassemblyPaused := frames >= muxStreamPauseFrames || bytes >= muxStreamPauseBytes
inboundPaused := stream != nil && len(stream.inbound) >= muxStreamInboundPause
inboundPaused := len(stream.inbound) >= muxStreamInboundPause
return reassemblyPaused, inboundPaused
}

Expand Down