Skip to content

Commit

Permalink
d'oh (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Apr 19, 2023
1 parent a055e98 commit 1177b0e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cmd/zrok/accessPrivateTunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/spf13/cobra"
"os"
"os/signal"
"runtime/pprof"
"syscall"
"time"
)
Expand All @@ -40,13 +39,6 @@ func newAccessPrivateTunnelCommand() *accessPrivateTunnelCommand {
}

func (cmd *accessPrivateTunnelCommand) run(_ *cobra.Command, args []string) {
// Start CPU profiling
f, err := os.Create("cpu.pprof")
if err != nil {
panic(err)
}
pprof.StartCPUProfile(f)

zrd, err := zrokdir.Load()
if err != nil {
tui.Error("unable to load zrokdir", err)
Expand Down Expand Up @@ -96,13 +88,12 @@ func (cmd *accessPrivateTunnelCommand) run(_ *cobra.Command, args []string) {
panic(err)
}
for {
time.Sleep(50)
time.Sleep(30 * 24 * time.Hour)
}
}

func (cmd *accessPrivateTunnelCommand) destroy(frontendName, envZId, shrToken string, zrok *rest_client_zrok.Zrok, auth runtime.ClientAuthInfoWriter) {
logrus.Debugf("shutting down '%v'", shrToken)
pprof.StopCPUProfile()
req := share.NewUnaccessParams()
req.Body = &rest_model_zrok.UnaccessRequest{
FrontendToken: frontendName,
Expand Down

0 comments on commit 1177b0e

Please sign in to comment.