Skip to content

Commit

Permalink
The HttpServerResponse close method closes the HTTP connection, it c…
Browse files Browse the repository at this point in the history
…an be misleading as there are better API to interact with the current request/connection lifecycle which are HttpServerResponse#reset and HttpConnection#close.

This commit deprecates the close method of HtttpServerResponse.
  • Loading branch information
vietj committed Aug 10, 2023
1 parent b76ddef commit 0fc43be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/vertx/core/http/HttpServerResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,10 @@ default HttpServerResponse sendFile(String filename, long offset, Handler<AsyncR

/**
* Close the underlying TCP connection corresponding to the request.
*
* @deprecated instead use {@link HttpConnection#close()} or {@link #reset(long)}, this method is removed in Vert.x 5
*/
@Deprecated
void close();

/**
Expand Down

0 comments on commit 0fc43be

Please sign in to comment.