Update release package imports

This commit is contained in:
vczh
2026-06-13 09:20:01 -07:00
parent 11d9686a3a
commit e4fe74c068
14 changed files with 1337 additions and 452 deletions
+27 -3
View File
@@ -3807,7 +3807,15 @@ RESTART_LOOP:
}
DWORD error = GetLastError();
if (error == ERROR_BROKEN_PIPE || error == ERROR_INVALID_HANDLE)
if (error == ERROR_BROKEN_PIPE || error == ERROR_NO_DATA)
{
if (!stopped)
{
OnDisconnected();
}
return;
}
if (error == ERROR_INVALID_HANDLE)
{
if (!stopped)
{
@@ -3866,7 +3874,16 @@ RESTART_LOOP:
else
{
DWORD error = GetLastError();
if (error == ERROR_OPERATION_ABORTED || error == ERROR_INVALID_HANDLE || error == ERROR_BROKEN_PIPE || error == ERROR_NO_DATA)
if (error == ERROR_BROKEN_PIPE || error == ERROR_NO_DATA)
{
if (!self->stopped)
{
self->OnDisconnected();
}
finalize();
return;
}
if (error == ERROR_OPERATION_ABORTED || error == ERROR_INVALID_HANDLE)
{
if (!self->stopped)
{
@@ -4061,6 +4078,14 @@ void NamedPipeConnection::InstallCallback(INetworkProtocolCallback* _callback)
void NamedPipeConnection::Stop()
{
stopped = 1;
SPIN_LOCK(lockWrite)
{
if (hPipe != INVALID_HANDLE_VALUE)
{
CancelIoEx(hPipe, NULL);
}
}
ReadWaitContext* context = readWaitContext.exchange(nullptr);
if (context)
{
@@ -4081,7 +4106,6 @@ void NamedPipeConnection::Stop()
{
if (hPipe != INVALID_HANDLE_VALUE)
{
CancelIoEx(hPipe, NULL);
CloseHandle(hPipe);
hPipe = INVALID_HANDLE_VALUE;
}