◐ Shell
clean mode source ↗

doc: note http.closeAllConnections excludes upgraded sockets · nodejs/node@59c5c5c

Original file line numberDiff line numberDiff line change

@@ -1705,8 +1705,10 @@ setTimeout(() => {

17051705

added: v18.2.0

17061706

-->

17071707
1708-

Closes all connections connected to this server, including active connections

1709-

connected to this server which are sending a request or waiting for a response.

1708+

Closes all established HTTP(S) connections connected to this server, including

1709+

active connections connected to this server which are sending a request or

1710+

waiting for a response. This does _not_ destroy sockets upgraded to a different

1711+

protocol, such as WebSocket or HTTP/2.

17101712
17111713

> This is a forceful way of closing all connections and should be used with

17121714

> caution. Whenever using this in conjunction with `server.close`, calling this