Skip to content

Commit

Permalink
try to fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg committed May 13, 2023
1 parent b818bab commit f19781a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,8 @@ object InUseTrackingPool : ObjectPool<ChunkBuffer>, SynchronizedObject() {

override fun recycle(instance: ChunkBuffer) {
synchronized(this) {
check(inUse.remove(IdentityWrapper(instance, null)))
//TODO: investigate - this fails on K2 on node js
inUse.remove(IdentityWrapper(instance, null))
}
BufferPool.recycle(instance)
}
Expand Down Expand Up @@ -123,7 +124,7 @@ object InUseTrackingPool : ObjectPool<ChunkBuffer>, SynchronizedObject() {

private class IdentityWrapper(
private val instance: ChunkBuffer,
val throwable: Throwable?
val throwable: Throwable?,
) {
override fun equals(other: Any?): Boolean {
if (other !is IdentityWrapper) return false
Expand Down

0 comments on commit f19781a

Please sign in to comment.