Skip to content

Commit b646945

Browse files
save file
1 parent 22a3326 commit b646945

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

blog/25-12-03/unix-sockets/ex/ipc-server-win.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22

3-
3+
// ipc-server-win.c
4+
5+
46
#include <windows.h>
57
#include <stdio.h>
68

@@ -31,8 +33,8 @@
3133
// Wait for a client (Node.js) to connect
3234
BOOL connected = ConnectNamedPipe(hPipe,NULL) ? TRUE : (GetLastError()==ERROR_PIPE_CONNECTED);
3335

34-
if (!connected){
35-
printf("ConnectNamedPipe failed with error %lu\n", GetLastError());
36+
if(!connected){
37+
printf("ConnectNamedPipe failed with error %lu\n",GetLastError());
3638
CloseHandle(hPipe);
3739
return 1;
3840
}
@@ -46,6 +48,8 @@
4648

4749
// Close pipe
4850
CloseHandle(hPipe);
51+
52+
4953
return 0;
5054

5155
}//main

0 commit comments

Comments
 (0)