Skip to content

Commit

Permalink
docs:fix grammar errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoranz758 committed Aug 9, 2023
1 parent efa7f31 commit 4de4696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/hertz/tutorials/basic-feature/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ Since the client has the problem of multiplexing connections, if streaming is us

2. Users can recycle the connection by calling the relevant interface. After recycling, the connection will be put into the connection pool for reuse, so as to achieve higher resource utilization and better performance. The following methods will recycle the connection. Warning: Recycling can only be done once.
1. Explicit call: `protocol.ReleaseResponse(), resp.Reset(), resp.ResetBody()`.
1. Implicit call: The server side will also recycle the response. Assign the client side response to the server side or pass the server side response to the client (eg: client uses reverse proxy), there is no need to display the method of calling the recovery.
1. Implicit call: The server side will also recycle the response. Assign the client side response to the server side or pass the server side response to the client (eg: client uses reverse proxy), there is no need to explicitly call the recycling method anymore.

Sample Code:

Expand Down
2 changes: 1 addition & 1 deletion content/zh/docs/hertz/tutorials/basic-feature/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ client 有复用连接的问题,如果使用了流式,那连接就会交由
1. 如果用户不关闭连接,连接最终会被 GC 关掉,不会造成连接泄漏。但是,由于关闭连接需要等待 2RTT,在高并发情况下可能会出现 fd 被打满导致无法新建连接的情况。
2. 用户可以调用相关接口回收连接,回收后,该连接会放入连接池中复用,资源使用率更好,性能更高。以下几种方式都会回收连接,注意回收只能回收一次。
1. 显式调用 `protocol.ReleaseResponse(), resp.Reset(), resp.ResetBody()`
2. 非显式调用:server 侧也会有回收 resp 的逻辑。如果将 client 的 response 赋值给 server 或者直接把 server 的 response 传递给 client 的情况下(如:client 作为反向代理)就不需要显示调用回收的方法了
2. 非显式调用:server 侧也会有回收 resp 的逻辑。如果将 client 的 response 赋值给 server 或者直接把 server 的 response 传递给 client 的情况下(如:client 作为反向代理)就不需要显式调用回收的方法了

示例代码:

Expand Down

0 comments on commit 4de4696

Please sign in to comment.