Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for isConnected (0.18 sec)

  1. internal/event/target/nats.go

    			target.stanConn, connErr = target.args.connectStan()
    		} else if !target.stanConn.NatsConn().IsConnected() {
    			return false, store.ErrNotConnected
    		}
    	} else {
    		if target.natsConn == nil {
    			target.natsConn, connErr = target.args.connectNats()
    		} else if !target.natsConn.IsConnected() {
    			return false, store.ErrNotConnected
    		}
    	}
    
    	if connErr != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Feb 27 18:11:55 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  2. internal/config/identity/plugin/config.go

    func (o *AuthNPlugin) doPeriodicHealthCheck() {
    	ticker := time.NewTicker(healthCheckInterval)
    	defer ticker.Stop()
    
    	for {
    		select {
    		case <-ticker.C:
    			now := time.Now()
    			isConnected := o.checkConnectivity(o.shutdownCtx)
    			if isConnected {
    				o.serviceMetrics.setConnSuccess(now)
    			} else {
    				o.serviceMetrics.setConnFailure(now)
    			}
    		case <-o.shutdownCtx.Done():
    			return
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 13.3K bytes
    - Viewed (3)
  3. internal/http/check_port_linux.go

    	"net"
    	"syscall"
    	"time"
    )
    
    // CheckPortAvailability - check if given host and port is already in use.
    // Note: The check method tries to listen on given port and closes it.
    // It is possible to have a disconnected client in this tiny window of time.
    func CheckPortAvailability(host, port string, opts TCPOptions) (err error) {
    	lc := &net.ListenConfig{
    		Control: func(network, address string, c syscall.RawConn) error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 03 21:12:25 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  4. internal/grid/connection.go

    			return
    		}
    		if debugPrint {
    			fmt.Println(c.Local, "Disconnected. Attempting to reconnect.")
    		}
    	}
    }
    
    func (c *Connection) disconnected() {
    	c.outgoing.Range(func(key uint64, client *muxClient) bool {
    		if !client.stateless {
    			client.cancelFn(ErrDisconnected)
    		}
    		return true
    	})
    	if debugReqs {
    		fmt.Println(c.String(), "Disconnected. Clearing outgoing.")
    	}
    	c.outgoing.Clear()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  5. cmd/speedtest.go

    			result.Concurrent = concurrency
    
    			select {
    			case ch <- result:
    			case <-ctx.Done():
    				return
    			}
    		}
    
    		for {
    			select {
    			case <-ctx.Done():
    				// If the client got disconnected stop the speedtest.
    				return
    			default:
    			}
    
    			sopts := speedTestOpts{
    				objectSize:   opts.objectSize,
    				concurrency:  concurrency,
    				duration:     opts.duration,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. cmd/peer-rest-client.go

    				return nil
    			}
    			gridConn.Store(gc)
    			return gc
    		},
    	}
    }
    
    // Wrapper to restClient.Call to handle network errors, in case of network error the connection is marked disconnected
    // permanently. The only way to restore the connection is at the xl-sets layer by xlsets.monitorAndConnectEndpoints()
    // after verifying format.json
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  7. internal/rest/client.go

    					return
    				}
    				if c.HealthCheckFn() {
    					if atomic.CompareAndSwapInt32(&c.connected, offline, online) {
    						now := time.Now()
    						disconnected := now.Sub(c.LastConn())
    						logger.Event(context.Background(), "healthcheck", "Client '%s' re-connected in %s", c.url.String(), disconnected)
    						atomic.StoreInt64(&c.lastConn, now.UnixNano())
    					}
    					return
    				}
    				attempt++
    				time.Sleep(backOff(attempt))
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    func (c *connMgr) LatestConn() *ZtunnelConnection {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	return c.latestConn
    }
    
    func (c *connMgr) deleteConn(conn *ZtunnelConnection) {
    	log.Debug("ztunnel disconnected")
    	c.mu.Lock()
    	defer c.mu.Unlock()
    	delete(c.connectionSet, conn)
    	if c.latestConn == conn {
    		c.latestConn = nil
    	}
    	ztunnelConnected.RecordInt(int64(len(c.connectionSet)))
    }
    
    // this is used in tests
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  9. cmd/storage-rest-server.go

    			if !xnet.IsNetworkOrHostDown(err, true) { // do not need to log disconnected clients
    				storageLogIf(r.Context(), err)
    			}
    			if err == nil || !errors.Is(err, xhttp.ErrNotImplemented) {
    				return
    			}
    		}
    	} // Fallback to regular copy
    
    	_, err = xioutil.Copy(w, rc)
    	if !xnet.IsNetworkOrHostDown(err, true) { // do not need to log disconnected clients
    		storageLogIf(r.Context(), err)
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  10. cmd/storage-rest-client.go

    	return client.endpoint.PoolIdx, client.endpoint.SetIdx, client.endpoint.DiskIdx
    }
    
    // Wrapper to restClient.Call to handle network errors, in case of network error the connection is disconnected
    // and a healthcheck routine gets invoked that would reconnect.
    func (client *storageRESTClient) call(ctx context.Context, method string, values url.Values, body io.Reader, length int64) (io.ReadCloser, error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 26.1K bytes
    - Viewed (0)
Back to top