Skip to content

Commit 5a5af79

Browse files
committed
remove exit on idle
1 parent f0bd84d commit 5a5af79

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
--- REL_17_5_WASM/src/interfaces/libpq/fe-misc.c
2+
+++ pglite-REL_17_5_WASM/src/interfaces/libpq/fe-misc.c
3+
@@ -826,7 +826,11 @@
4+
int sent;
5+
6+
#ifndef WIN32
7+
+#if defined(__wasi__)
8+
+ sent = send(conn->sock, ptr, len, 0);
9+
+#else
10+
sent = pqsecure_write(conn, ptr, len);
11+
+#endif /* __wasi__ */
12+
#else
13+
14+
/*
15+
@@ -959,7 +963,9 @@
16+
17+
return pqSendSome(conn, conn->outCount);
18+
}
19+
-
20+
+#if defined(__wasi__)
21+
+ sdk_sock_flush();
22+
+#endif /* __wasi__ */
23+
return 0;
24+
}
25+
26+
@@ -1040,6 +1046,9 @@
27+
static int
28+
pqSocketCheck(PGconn *conn, int forRead, int forWrite, pg_usec_time_t end_time)
29+
{
30+
+#if defined(__wasi__)
31+
+ return 1;
32+
+#else
33+
int result;
34+
35+
if (!conn)
36+
@@ -1073,6 +1082,7 @@
37+
}
38+
39+
return result;
40+
+#endif
41+
}
42+
43+

portable/wasi-sdk-25.tar.xz

880 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)