Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 988 for Close (0.14 sec)

  1. internal/http/close.go

    	"io"
    
    	xioutil "github.com/minio/minio/internal/ioutil"
    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    Go
    - Registered: 2024-02-25 19:28
    - Last Modified: 2024-01-18 07:03
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.listener.assertExhausted()
        server.source.close()
        client.source.close()
        server.webSocket!!.tearDown()
        client.webSocket!!.tearDown()
        taskFaker.close()
      }
    
      @Test
      fun close() {
        client.webSocket!!.close(1000, "Hello!")
        taskFaker.runTasks()
        // This will trigger a close response.
        assertThat(server.processNextFrame()).isFalse()
    Plain Text
    - Registered: 2024-02-23 11:42
    - Last Modified: 2024-01-20 10:30
    - 16.8K bytes
    - Viewed (0)
  3. .github/workflows/stale-issue.yml

              only-pr-labels: 'pending:dco'
    
              # ISSUES ------------------------------------------------------------
              days-before-issue-close: 7
              stale-issue-label: 'pending:reproducer'
              close-issue-label: 'closed:unreproducible'
              close-issue-message: >
                While we asked for a reproducer, none was provided. If you provide a valid reproducer, we will consider this issue again.
    Others
    - Registered: 2024-01-17 11:36
    - Last Modified: 2023-12-22 09:36
    - 2.7K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/java/okhttp3/internal/ws/RealWebSocketTest.java

        server.listener.assertExhausted();
        server.getSource().close();
        client.getSource().close();
        server.webSocket.tearDown();
        client.webSocket.tearDown();
        taskFaker.close();
      }
    
      @Test public void close() throws IOException {
        client.webSocket.close(1000, "Hello!");
        taskFaker.runTasks();
        // This will trigger a close response.
        assertThat(server.processNextFrame()).isFalse();
    Java
    - Registered: 2023-12-15 11:42
    - Last Modified: 2023-12-02 16:51
    - 17.8K bytes
    - Viewed (0)
  5. okhttp/src/jvmMain/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        // Don't send pongs after we've failed or sent the close frame.
        if (failed || enqueuedClose && messageAndCloseQueue.isEmpty()) return false
    
        pongQueue.add(payload)
        runWriter()
        return true
      }
    
      override fun close(code: Int, reason: String?): Boolean {
        return close(code, reason, CANCEL_AFTER_CLOSE_MILLIS)
      }
    
      @Synchronized fun close(
        code: Int,
        reason: String?,
    Plain Text
    - Registered: 2023-12-15 11:42
    - Last Modified: 2023-12-02 16:51
    - 21.7K bytes
    - Viewed (2)
  6. guava-tests/test/com/google/common/io/CloseablesTest.java

    import java.io.Reader;
    import junit.framework.TestCase;
    
    /**
     * Unit tests for {@link Closeables}.
     *
     * <p>Checks proper closing behavior, and ensures that IOExceptions on Closeable.close() are not
     * propagated out from the {@link Closeables#close} method if {@code swallowException} is true.
     *
     * @author Michael Lancaster
     */
    public class CloseablesTest extends TestCase {
      private Closeable mockCloseable;
    
    Java
    - Registered: 2024-02-23 12:43
    - Last Modified: 2017-12-04 17:37
    - 4K bytes
    - Viewed (0)
  7. src/archive/zip/register.go

    }
    
    type pooledFlateWriter struct {
    	mu sync.Mutex // guards Close and Write
    	fw *flate.Writer
    }
    
    func (w *pooledFlateWriter) Write(p []byte) (n int, err error) {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	if w.fw == nil {
    		return 0, errors.New("Write after Close")
    	}
    	return w.fw.Write(p)
    }
    
    func (w *pooledFlateWriter) Close() error {
    	w.mu.Lock()
    	defer w.mu.Unlock()
    	var err error
    	if w.fw != nil {
    Go
    - Registered: 2024-02-13 11:13
    - Last Modified: 2023-10-13 18:36
    - 3.7K bytes
    - Viewed (0)
  8. internal/s3select/json/reader.go

    	dstRec, ok := dst.(*Record)
    	if !ok {
    		dstRec = &Record{}
    	}
    	dstRec.KVS = kvs
    	dstRec.SelectFormat = sql.SelectFmtJSON
    	return dstRec, nil
    }
    
    // Close - closes underlying reader.
    func (r *Reader) Close() error {
    	// Close the input.
    	err := r.readCloser.Close()
    	for range r.valueCh {
    		// Drain values so we don't leak a goroutine.
    		// Since we have closed the input, it should fail rather quickly.
    	}
    	return err
    }
    Go
    - Registered: 2024-02-25 19:28
    - Last Modified: 2022-03-24 03:58
    - 3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

        if (failed || enqueuedClose && messageAndCloseQueue.isEmpty()) return false
    
        pongQueue.add(payload)
        runWriter()
        return true
      }
    
      override fun close(
        code: Int,
        reason: String?,
      ): Boolean {
        return close(code, reason, CANCEL_AFTER_CLOSE_MILLIS)
      }
    
      @Synchronized fun close(
        code: Int,
        reason: String?,
    Plain Text
    - Registered: 2024-02-23 11:42
    - Last Modified: 2024-01-08 01:13
    - 22.1K bytes
    - Viewed (0)
  10. internal/lock/lock_test.go

    	if isClosed {
    		t.Fatal("File ref count shouldn't be zero")
    	}
    
    	// Decrease reference count by 1.
    	if err = rlk.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	isClosed = rlk.IsClosed()
    	if isClosed {
    		t.Fatal("File ref count shouldn't be zero")
    	}
    
    	// Decrease reference count by 1.
    	if err = rlk.Close(); err != nil {
    		t.Fatal(err)
    	}
    
    	// Now file should be closed.
    	isClosed = rlk.IsClosed()
    Go
    - Registered: 2024-02-25 19:28
    - Last Modified: 2022-09-19 18:05
    - 3.6K bytes
    - Viewed (0)
Back to top