Skip to content

Commit

Permalink
server close statment upon data write completion
Browse files Browse the repository at this point in the history
  • Loading branch information
sumn2u committed Dec 7, 2023
1 parent 260d3eb commit 285d689
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions experiments/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const server = net.createServer((socket) => {
socket.on('end', () => {
console.log('Data transfer complete');
socket.end();
server.close();
});
});

Expand Down

0 comments on commit 285d689

Please sign in to comment.