@@ -64,6 +64,8 @@ type StreamInfo struct {
64
64
}
65
65
66
66
func (sd * StreamInfo ) IsActive () bool {
67
+ sd .sdm .Lock ()
68
+ defer sd .sdm .Unlock ()
67
69
if sd .StreamCtx .Err () != nil {
68
70
return false
69
71
}
@@ -128,19 +130,29 @@ func (extCaps *ExternalCapabilities) AddStream(streamID string, capability strin
128
130
129
131
//orchestrator channels shutdown
130
132
if stream .pubChannel != nil {
131
- stream .pubChannel .Close ()
133
+ if err := stream .pubChannel .Close (); err != nil {
134
+ glog .Errorf ("error closing pubChannel for stream=%s: %v" , streamID , err )
135
+ }
132
136
}
133
137
if stream .subChannel != nil {
134
- stream .subChannel .Close ()
138
+ if err := stream .subChannel .Close (); err != nil {
139
+ glog .Errorf ("error closing subChannel for stream=%s: %v" , streamID , err )
140
+ }
135
141
}
136
142
if stream .controlChannel != nil {
137
- stream .controlChannel .Close ()
143
+ if err := stream .controlChannel .Close (); err != nil {
144
+ glog .Errorf ("error closing controlChannel for stream=%s: %v" , streamID , err )
145
+ }
138
146
}
139
147
if stream .eventsChannel != nil {
140
- stream .eventsChannel .Close ()
148
+ if err := stream .eventsChannel .Close (); err != nil {
149
+ glog .Errorf ("error closing eventsChannel for stream=%s: %v" , streamID , err )
150
+ }
141
151
}
142
152
if stream .dataChannel != nil {
143
- stream .dataChannel .Close ()
153
+ if err := stream .dataChannel .Close (); err != nil {
154
+ glog .Errorf ("error closing dataChannel for stream=%s: %v" , streamID , err )
155
+ }
144
156
}
145
157
return
146
158
}()
0 commit comments