Skip to content

Commit 80c074a

Browse files
fix: call server.close() before closeAllConnections() to prevent new socket race
1 parent 284336a commit 80c074a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/feishu/src/monitor.state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ export function closeHttpServer(server: http.Server): Promise<void> {
141141
resolve();
142142
}, SERVER_CLOSE_TIMEOUT_MS);
143143

144-
(server.closeAllConnections as (() => void) | undefined)?.();
145144
server.close(() => {
146145
clearTimeout(timer);
147146
resolve();
148147
});
148+
(server.closeAllConnections as (() => void) | undefined)?.();
149149
});
150150
}
151151

0 commit comments

Comments
 (0)