diff --git a/gpcm/main.go b/gpcm/main.go index eb1b0e1..d13fe91 100644 --- a/gpcm/main.go +++ b/gpcm/main.go @@ -110,7 +110,6 @@ func Shutdown() { db.Close() logging.Notice("GPCM", "Saved", aurora.Cyan(len(sessions)), "sessions") - } func CloseConnection(index uint64) { diff --git a/main.go b/main.go index fea3252..a25a587 100644 --- a/main.go +++ b/main.go @@ -359,8 +359,10 @@ func frontendMain(noSignal, noBackend bool) { rpcMutex.Unlock() logging.Notice("FRONTEND", "Sending RPCPacket.Shutdown") - common.ShouldNotError(rpcClient.Call("RPCPacket.Shutdown", "", nil)) - common.ShouldNotError(rpcClient.Close()) + if err := rpcClient.Call("RPCPacket.Shutdown", "", nil); err != nil { + logging.Error("FRONTEND", "Error during backend shutdown:", err.Error()) + } + _ = rpcClient.Close() } // startFrontendServer starts the frontend RPC server. diff --git a/natneg/main.go b/natneg/main.go index ec12c8d..297ef8a 100644 --- a/natneg/main.go +++ b/natneg/main.go @@ -130,7 +130,7 @@ func StartServer(reload bool) { // Close the listener when the application closes. defer func() { - common.ShouldNotError(conn.Close()) + _ = conn.Close() }() logging.Notice("NATNEG", "Listening on", aurora.BrightCyan(address)) diff --git a/qr2/main.go b/qr2/main.go index 058638e..42f5063 100644 --- a/qr2/main.go +++ b/qr2/main.go @@ -93,7 +93,7 @@ func StartServer(reload bool) { // Close the listener when the application closes. defer func() { - common.ShouldNotError(conn.Close()) + _ = conn.Close() }() logging.Notice("QR2", "Listening on", aurora.BrightCyan(address))