Skip to content

Commit

Permalink
fix typo and make stub call timeout parameter using Timeout instead o…
Browse files Browse the repository at this point in the history
…f uint64
  • Loading branch information
Coldwings committed Sep 5, 2024
1 parent 2012ff4 commit 32fd5ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpc/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ namespace rpc {

class StubPoolImpl : public StubPool {
public:
explicit StubPoolImpl(uint64_t expiration, int64_t connect_timeout, uint64_t transfer_timeout) {
explicit StubPoolImpl(uint64_t expiration, uint64_t connect_timeout, uint64_t transfer_timeout) {
tls_ctx = net::new_tls_context(nullptr, nullptr, nullptr);
tcpclient = net::new_tcp_socket_client();
tcpclient->timeout(connect_timeout);
Expand Down
4 changes: 2 additions & 2 deletions rpc/rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace rpc
/**
* @param req Request of Message
* @param resp Response of Message
* @param timeout timeout in milliseconds, -1UL for no timeout
* @param timeout RPC timeout, counting from sending request to receiving response header
* @return The number of bytes received, -1 for failure
* @note Request and Response should assign to external memory buffers if they have variable-length fields.
* Via this, we can achieve zero-copy send and receive.
Expand All @@ -70,7 +70,7 @@ namespace rpc
template<typename Operation>
int call(typename Operation::Request& req,
typename Operation::Response& resp,
uint64_t timeout = -1UL)
Timeout timeout = {})
{
SerializerIOV reqmsg;
reqmsg.serialize(req);
Expand Down

0 comments on commit 32fd5ed

Please sign in to comment.