From e8d6db11561998569a3924b31d00358a503b236f Mon Sep 17 00:00:00 2001 From: AWoloszyn Date: Wed, 13 Mar 2019 09:43:31 -0400 Subject: [PATCH] Check if the connection exists before shutting down. This fixes #2620 --- gapir/client/session.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gapir/client/session.go b/gapir/client/session.go index c7dcf784e3..72bde15d61 100644 --- a/gapir/client/session.go +++ b/gapir/client/session.go @@ -374,7 +374,9 @@ func (s *session) onClose(f func()) { } func (s *session) close(ctx context.Context) { - s.conn.Shutdown(ctx) + if s.conn != nil { + s.conn.Shutdown(ctx) + } for _, f := range s.closeCBs { f() }