Skip to content

Commit

Permalink
v1.2.7 - fix: ObjectPool bug;
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Nov 22, 2023
1 parent 27425a2 commit 12dee8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/FreeRedis/FreeRedis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>FreeRedis</AssemblyName>
<PackageId>FreeRedis</PackageId>
<RootNamespace>FreeRedis</RootNamespace>
<Version>1.2.6</Version>
<Version>1.2.7</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/2881099/FreeRedis</PackageProjectUrl>
<Description>FreeRedis is .NET redis client, supports cluster, sentinel, master-slave, pipeline, transaction and connection pool.</Description>
Expand Down
6 changes: 3 additions & 3 deletions src/FreeRedis/Internal/ObjectPool/ObjectPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public Object<T> Get(TimeSpan? timeout = null)
}
catch
{
Return(obj);
Return(obj, true);
throw;
}

Expand Down Expand Up @@ -410,7 +410,7 @@ async public Task<Object<T>> GetAsync()
}
catch
{
Return(obj);
Return(obj, true);
throw;
}

Expand All @@ -423,7 +423,7 @@ async public Task<Object<T>> GetAsync()
}
#endif

public void Return(Object<T> obj, bool isReset = false)
public void Return(Object<T> obj, bool isReset = false)
{
if (obj == null) return;
if (obj._isReturned) return;
Expand Down

0 comments on commit 12dee8b

Please sign in to comment.