Skip to content

Commit

Permalink
release task resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiritreader committed Oct 31, 2022
1 parent fd345d1 commit bf2bb7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AutoDarkModeSvc/AutoDarkModeSvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<UseWindowsForms>true</UseWindowsForms>
<Version>10.3.0.86</Version>
<Version>10.3.0.87</Version>
<AssemblyName>AutoDarkModeSvc</AssemblyName>
<ApplicationIcon>..\adm_tray_new.ico</ApplicationIcon>
<StartupObject>AutoDarkModeSvc.Program</StartupObject>
Expand Down
2 changes: 1 addition & 1 deletion AutoDarkModeSvc/Communication/AsyncPipeServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private async Task<Tuple<string, string>> HandleRequest()
// a read operation must be completed within streamTimeout, otherwise the pipe connection will be closed server-side to avoid infinite hanging
// this is especially important if a client connects, and never writes anything to the stream, this would block a worker until the client terminates
using CancellationTokenSource readTimeoutTokenSource = new();
Task tew = new TimeoutEventWrapper(requestPipe, readTimeoutTokenSource.Token).Monitor();
using Task tew = new TimeoutEventWrapper(requestPipe, readTimeoutTokenSource.Token).Monitor();
readTimeoutTokenSource.CancelAfter(streamTimeout);
if (requestPipe.CanRead)
{
Expand Down

0 comments on commit bf2bb7f

Please sign in to comment.