Skip to content

Commit

Permalink
Set allowHalfOpen: true for TCP servers
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Mar 14, 2024
1 parent f887e5a commit 75c9051
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-pugs-wait.md
@@ -0,0 +1,5 @@
---
"nxjs-runtime": patch
---

Set `allowHalfOpen: true` for TCP servers
1 change: 1 addition & 0 deletions packages/runtime/src/tcp.ts
Expand Up @@ -226,6 +226,7 @@ export function createServer(ip: string, port: number) {
const server = $.tcpServerNew(ip, port, function onAccept(fd) {
// @ts-expect-error Internal constructor
const socket = new Socket(INTERNAL_SYMBOL, null, {
allowHalfOpen: true,
async connect() {
return fd;
},
Expand Down

0 comments on commit 75c9051

Please sign in to comment.