MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / reconcileConn

Function reconcileConn

pkg/jobcontroller/jobcontroller.go:265–287  ·  view source on GitHub ↗
(connName string, targetState bool)

Source from the content-addressed store, hash-verified

263}
264
265func reconcileConn(connName string, targetState bool) {
266 defer func() {
267 panichandler.PanicHandler("jobcontroller:reconcileConn", recover())
268 }()
269
270 if targetState {
271 onConnectionUp(connName)
272 } else {
273 onConnectionDown(connName)
274 }
275
276 connStates.Lock()
277 defer connStates.Unlock()
278 if cs, exists := connStates.m[connName]; exists {
279 cs.processed = targetState
280 cs.reconciling = false
281 }
282
283 select {
284 case connStates.reconcileCh <- struct{}{}:
285 default:
286 }
287}
288
289func getMetaInt64(meta wshrpc.FileMeta, key string) int64 {
290 val, ok := meta[key]

Callers 1

reconcileAllConnsFunction · 0.85

Calls 3

PanicHandlerFunction · 0.92
onConnectionUpFunction · 0.85
onConnectionDownFunction · 0.85

Tested by

no test coverage detected