Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 3,889 for close1 (0.14 sec)

  1. src/net/http/transport_test.go

    		io.Copy(io.Discard, r.Body)
    	})).ts
    
    	c := ts.Client()
    
    	closes := 0
    
    	res, err := c.Post(ts.URL, "text/plain", countCloseReader{&closes, strings.NewReader("hello")})
    	if err != nil {
    		t.Fatal(err)
    	}
    	res.Body.Close()
    	if closes != 1 {
    		t.Errorf("closes = %d; want 1", closes)
    	}
    }
    
    func TestTransportTLSHandshakeTimeout(t *testing.T) {
    	defer afterTest(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/httpstream/wsstream/conn.go

    	for _, s := range conn.channels {
    		s.Close()
    	}
    	var err error
    	if conn.ws != nil {
    		err = conn.ws.Close()
    	}
    	return err
    }
    
    // Close is only valid after Open has been called
    func (conn *Conn) Close() error {
    	<-conn.ready
    	return conn.closeNonThreadSafe()
    }
    
    // protocolSupportsStreamClose returns true if the passed protocol
    // supports the stream close signal (currently only V5 remotecommand);
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  3. src/mime/quotedprintable/writer.go

    	if n == len(p) {
    		return n, nil
    	}
    
    	if err := w.write(p[n:]); err != nil {
    		return n, err
    	}
    
    	return len(p), nil
    }
    
    // Close closes the [Writer], flushing any unwritten data to the underlying
    // [io.Writer], but does not close the underlying io.Writer.
    func (w *Writer) Close() error {
    	if err := w.checkLastByte(); err != nil {
    		return err
    	}
    
    	return w.flush()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

                @Throws(IOException::class)
                override fun close() {
                  closed.set(true)
                  super.close()
                }
              }.buffer()
            }
          }
        body.charStream().close()
        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun readerClosedAfterBomClosesUnderlyingSource() {
        val closed = AtomicBoolean()
        val body: ResponseBody =
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 13K bytes
    - Viewed (0)
  5. src/context/context.go

    // For example, if childContext is derived from parentContext:
    //   - if parentContext is canceled with cause1 before childContext is canceled with cause2,
    //     then Cause(parentContext) == Cause(childContext) == cause1
    //   - if childContext is canceled with cause2 before parentContext is canceled with cause1,
    //     then Cause(parentContext) == cause1 and Cause(childContext) == cause2
    type CancelCauseFunc func(cause error)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 23.7K bytes
    - Viewed (0)
  6. .github/workflows/stale-issues.yml

                It will be closed if no further activity occurs. Thank you.
              close-issue-message: >
                This issue was closed because it has been inactive for 7 days since being marked as stale.
                Please reopen if you'd like to work on this further.
              days-before-pr-stale: 14
              days-before-pr-close: 14
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 23 20:04:38 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go

    	mux    sync.RWMutex
    	client *clientv3.Client
    	closed bool
    }
    
    func (t *etcd3ProberMonitor) Close() error {
    	t.mux.Lock()
    	defer t.mux.Unlock()
    	if !t.closed {
    		t.closed = true
    		return t.client.Close()
    	}
    	return fmt.Errorf("closed")
    }
    
    func (t *etcd3ProberMonitor) Probe(ctx context.Context) error {
    	t.mux.RLock()
    	defer t.mux.RUnlock()
    	if t.closed {
    		return fmt.Errorf("closed")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 07:56:39 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go

    //   - Timer has passed.
    //   - Buffer channel is closed and empty.
    //   - stopCh is closed.
    func (b *bufferedBackend) collectEvents(timer <-chan time.Time, stopCh <-chan struct{}) []*auditinternal.Event {
    	var events []*auditinternal.Event
    
    L:
    	for i := 0; i < b.maxBatchSize; i++ {
    		select {
    		case ev, ok := <-b.buffer:
    			// Buffer channel was closed and no new events will follow.
    			if !ok {
    				break L
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 9.1K bytes
    - Viewed (0)
  9. test/closedchan.go

    // Test close(c), receive of closed channel.
    //
    // TODO(rsc): Doesn't check behavior of close(c) when there
    // are blocked senders/receivers.
    
    package main
    
    import "os"
    
    var failed bool
    
    type Chan interface {
    	Send(int)
    	Nbsend(int) bool
    	Recv() (int)
    	Nbrecv() (int, bool)
    	Recv2() (int, bool)
    	Nbrecv2() (int, bool, bool)
    	Close()
    	Impl() string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:48:57 UTC 2012
    - 5.8K bytes
    - Viewed (0)
  10. src/net/rpc/client_test.go

    	codec := &shutdownCodec{responded: make(chan int)}
    	client := NewClientWithCodec(codec)
    	<-codec.responded
    	client.Close()
    	if !codec.closed {
    		t.Error("client.Close did not close codec")
    	}
    }
    
    // Test that errors in gob shut down the connection. Issue 7689.
    
    type R struct {
    	msg []byte // Not exported, so R does not work with gob.
    }
    
    type S struct{}
    
    func (s *S) Recv(nul *struct{}, reply *R) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 1.7K bytes
    - Viewed (0)
Back to top