Skip to content

Commit

Permalink
fix: update basic grpc implementation (#1153)
Browse files Browse the repository at this point in the history
In this basic grpc implementation example `serialize` callback is not
correct and throws error in testing it. I have update `serialize` with
`Buffer.from` which is working fine.
  • Loading branch information
monster-anshu authored Dec 27, 2024
1 parent bdbee02 commit 6ec7909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ const sendRequest: RpcImpl = (service, method, data) => {
return argument;
}

// Using passThrough as the serialize and deserialize functions
conn.makeUnaryRequest(path, passThrough, passThrough, data, resultCallback);
// Using passThrough as the deserialize functions
conn.makeUnaryRequest(path, d => Buffer.from(d), passThrough, data, resultCallback);
});
};

Expand Down

0 comments on commit 6ec7909

Please sign in to comment.