From 539a99d76c13e806a11639a8dd0027b5c8e58572 Mon Sep 17 00:00:00 2001 From: Ben Cartwright-Cox Date: Tue, 21 Feb 2023 22:16:26 +0000 Subject: [PATCH] More cleanup of unused functions and/or struct contents --- cmd/stayrtr/stayrtr.go | 11 ----------- lib/client.go | 12 +----------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/cmd/stayrtr/stayrtr.go b/cmd/stayrtr/stayrtr.go index 44c68d0..4726051 100644 --- a/cmd/stayrtr/stayrtr.go +++ b/cmd/stayrtr/stayrtr.go @@ -147,16 +147,6 @@ var ( 0: rtr.PROTOCOL_VERSION_0, 1: rtr.PROTOCOL_VERSION_1, } - authToId = map[string]int{ - "none": METHOD_NONE, - "password": METHOD_PASSWORD, - //"key": METHOD_KEY, - } - serialToId = map[string]int{ - "disable": USE_SERIAL_DISABLE, - "startup": USE_SERIAL_START, - "full": USE_SERIAL_FULL, - } ) func initMetrics() { @@ -584,7 +574,6 @@ type state struct { lastchange time.Time lastts time.Time sendNotifs bool - useSerial int fetchConfig *utils.FetchConfig diff --git a/lib/client.go b/lib/client.go index e361590..acf7133 100644 --- a/lib/client.go +++ b/lib/client.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "net" - "time" "golang.org/x/crypto/ssh" ) @@ -83,16 +82,7 @@ func (c *ClientSession) sendLoop() { c.wr.Write(pdu.Bytes()) } case <-c.quit: - break - } - } -} - -func (c *ClientSession) refreshLoop() { - for c.connected { - select { - case <-time.After(20 * time.Second): - // send refresh + return } } }