Przeglądaj źródła

only stop nodeEvents if it is not null

Chris Bannister 10 lat temu
rodzic
commit
0ab19f64e3
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      session.go

+ 3 - 1
session.go

@@ -247,7 +247,9 @@ func (s *Session) Close() {
 		s.control.close()
 	}
 
-	s.nodeEvents.stop()
+	if s.nodeEvents != nil {
+		s.nodeEvents.stop()
+	}
 }
 
 func (s *Session) Closed() bool {