1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-06 10:34:09 +00:00

1. Set upperbound on number of Windows WaitHandles

2. Fixed Windows_IPC to DisconnectNamedPipe() on connected handled when 'end' is called
3. Fixed Windispatch to terminate on when close is emitted
This commit is contained in:
Bryan Roe
2020-05-19 01:14:18 -07:00
parent f115066e68
commit eba7419fc9
5 changed files with 33 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@@ -990,7 +990,11 @@ void ILibDuktape_net_server_IPC_EndSink(ILibDuktape_DuplexStream *stream, void *
if (!ILibMemory_CanaryOK(user)) { return; }
ILibDuktape_net_WindowsIPC *winIPC = (ILibDuktape_net_WindowsIPC*)user;
if (winIPC->mPipeHandle != NULL) { CloseHandle(winIPC->mPipeHandle); winIPC->mPipeHandle = NULL; }
if (winIPC->mPipeHandle != NULL)
{
if (winIPC->mServer != NULL) { DisconnectNamedPipe(winIPC->mPipeHandle); }
CloseHandle(winIPC->mPipeHandle); winIPC->mPipeHandle = NULL;
}
if (winIPC->read_overlapped.hEvent != NULL) { CloseHandle(winIPC->read_overlapped.hEvent); winIPC->read_overlapped.hEvent = NULL; }
if (winIPC->write_overlapped.hEvent != NULL) { CloseHandle(winIPC->write_overlapped.hEvent); winIPC->write_overlapped.hEvent = NULL; }