Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 173 for leaked (0.04 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        return capacityWithoutIt >= addressState.policy.minimumConcurrentCalls
      }
    
      /**
       * Prunes any leaked calls and then returns the number of remaining live calls on [connection].
       * Calls are leaked if the connection is tracking them but the application code has abandoned
       * them. Leak detection is imprecise and relies on garbage collection.
       */
      private fun pruneAndGetAllocationCount(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jun 03 17:10:08 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt

         * with other sources.
         *
         * **Warning:** callers to this method must immediately call [newSource] to create a source and
         * close that when they're done. Otherwise a handle to [file] will be leaked.
         */
        @Throws(IOException::class)
        fun edit(
          file: File,
          upstream: Source,
          metadata: ByteString,
          bufferMaxSize: Long,
        ): Relay {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 17:15:47 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

    import org.junit.jupiter.api.extension.BeforeEachCallback
    import org.junit.jupiter.api.extension.ExtensionContext
    
    /**
     * Apply this rule to all tests. It adds additional checks for leaked resources and uncaught
     * exceptions.
     *
     * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically
     * configured for testing.
     */
    class OkHttpClientTestRule :
      BeforeEachCallback,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

        server.send("Hello, WebSockets!")
        clientListener.assertTextMessage("Hello, WebSockets!")
        closeWebSockets(webSocket, server)
      }
    
      /**
       * We had a bug where web socket connections were leaked if the HTTP connection upgrade was not
       * successful. This test confirms that connections are released back to the connection pool!
       * https://github.com/square/okhttp/issues/4258
       */
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        server.enqueue(
          MockResponse(body = "This gets leaked."),
        )
        client =
          clientTestRule
            .newClientBuilder()
            .connectionPool(ConnectionPool(0, 10, TimeUnit.MILLISECONDS))
            .build()
        val request = Request(server.url("/"))
        client.newCall(request).execute() // Ignore the response so it gets leaked then GC'd.
        awaitGarbageCollection()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

       * in-flight request from any thread. It's the caller's responsibility to close the request body
       * and response body streams; otherwise resources may be leaked.
       *
       * This method is safe to be called concurrently, but provides limited guarantees. If a transport
       * layer connection has been established (such as a HTTP/2 stream) that is terminated. Otherwise
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

      }
    
      @SuppressWarnings({"removal", "Finalize"}) // b/260137033
      @Override
      protected void finalize() {
        if (state.get().equals(OPEN)) {
          logger.get().log(SEVERE, "Uh oh! An open ClosingFuture has leaked and will close: {0}", this);
          FluentFuture<V> unused = finishToFuture();
        }
      }
    
      private static void closeQuietly(@Nullable AutoCloseable closeable, Executor executor) {
        if (closeable == null) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 97.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/ClosingFuture.java

      }
    
      @SuppressWarnings({"removal", "Finalize"}) // b/260137033
      @Override
      protected void finalize() {
        if (state.get().equals(OPEN)) {
          logger.get().log(SEVERE, "Uh oh! An open ClosingFuture has leaked and will close: {0}", this);
          FluentFuture<V> unused = finishToFuture();
        }
      }
    
      private static void closeQuietly(@Nullable AutoCloseable closeable, Executor executor) {
        if (closeable == null) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 98.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/internal/smb2/lease/LeaseManagerTest.java

            // Clean up leases older than 5ms
            int cleaned = leaseManager.cleanupExpiredLeases(5);
    
            // At least the first lease should be cleaned
            assertTrue(cleaned >= 1);
    
            // Check if old lease was removed
            LeaseEntry entry1 = leaseManager.getLease(key1);
            if (cleaned == 2) {
                assertNull(entry1);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 00:16:17 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/lease/LeaseManager.java

        }
    
        /**
         * Get all active leases
         *
         * @return map of lease keys to lease entries
         */
        public Map<Smb2LeaseKey, LeaseEntry> getAllLeases() {
            return new ConcurrentHashMap<>(leases);
        }
    
        /**
         * Clean up expired leases
         *
         * @param maxAgeMillis maximum age in milliseconds
         * @return number of leases cleaned up
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 18.8K bytes
    - Viewed (0)
Back to top