ftx: null guard in close

This commit is contained in:
ycdesu 2021-03-27 09:54:12 +08:00
parent e138531bfc
commit 3bcd5a8e83

View File

@ -41,5 +41,8 @@ func (s *Stream) Subscribe(channel types.Channel, symbol string, _ types.Subscri
} }
} }
func (s *Stream) Close() error { func (s *Stream) Close() error {
return s.wsService.Close() if s.wsService != nil {
return s.wsService.Close()
}
return nil
} }