@@ -69,11 +69,12 @@ var addSessionCommand = cli.Command{
6969}
7070
7171func addSession (ctx * cli.Context ) error {
72- client , cleanup , err := getClient (ctx )
72+ clientConn , cleanup , err := connectClient (ctx )
7373 if err != nil {
7474 return err
7575 }
7676 defer cleanup ()
77+ client := litrpc .NewSessionsClient (clientConn )
7778
7879 label := ctx .String ("label" )
7980 if label == "" {
@@ -192,11 +193,12 @@ var sessionStateMap = map[litrpc.SessionState]sessionFilter{
192193
193194func listSessions (filter sessionFilter ) func (ctx * cli.Context ) error {
194195 return func (ctx * cli.Context ) error {
195- client , cleanup , err := getClient (ctx )
196+ clientConn , cleanup , err := connectClient (ctx )
196197 if err != nil {
197198 return err
198199 }
199200 defer cleanup ()
201+ client := litrpc .NewSessionsClient (clientConn )
200202
201203 ctxb := context .Background ()
202204 resp , err := client .ListSessions (
@@ -240,11 +242,12 @@ var revokeSessionCommand = cli.Command{
240242}
241243
242244func revokeSession (ctx * cli.Context ) error {
243- client , cleanup , err := getClient (ctx )
245+ clientConn , cleanup , err := connectClient (ctx )
244246 if err != nil {
245247 return err
246248 }
247249 defer cleanup ()
250+ client := litrpc .NewSessionsClient (clientConn )
248251
249252 pubkey , err := hex .DecodeString (ctx .String ("localpubkey" ))
250253 if err != nil {
0 commit comments