MCPcopy Index your code
hub / github.com/koding/kite / dialForever

Method dialForever

client.go:347–371  ·  view source on GitHub ↗
(connectNotifyChan chan bool)

Source from the content-addressed store, hash-verified

345}
346
347func (c *Client) dialForever(connectNotifyChan chan bool) {
348 dial := func() error {
349 if !c.reconnect() {
350 return nil
351 }
352
353 c.LocalKite.Log.Info("Dialing '%s' kite: %s", c.Kite.Name, c.URL)
354
355 if err := c.dial(0); err != nil {
356 c.LocalKite.Log.Warning("Dialing '%s' kite error: %s: %v", c.Kite.Name, c.URL, err)
357
358 return err
359 }
360
361 return nil
362 }
363
364 backoff.Retry(dial, c.redialBackOff) // this will retry dial forever
365
366 if connectNotifyChan != nil {
367 close(connectNotifyChan)
368 }
369
370 go c.run()
371}
372
373func (c *Client) RemoteAddr() string {
374 session := c.getSession()

Callers 2

DialForeverMethod · 0.95
runMethod · 0.95

Calls 5

reconnectMethod · 0.95
dialMethod · 0.95
runMethod · 0.95
InfoMethod · 0.80
WarningMethod · 0.80

Tested by

no test coverage detected