Closed tzwm closed 8 years ago
@tzwm I think you opened this on the wrong repository. I think you intended you file an issue with scorix/protobuf-rpc-register since that is the gem you are using. This repository is for the protobuf
gem
@mmmries I'm using scorix/protobuf-rpc-register, but this gem is using callback by protobuf
. I found the problem is no callback was called. And the callback is belongs to protobuf
.
What happens when you call send_rpc_request
without a block? If the client is configured correctly, you should get a raw Protobuf response back.
I ask because we are using this code in production today without issue. I also maintain ActiveRemote which uses the callbacks in it's Protobuf adapter, which is are also using in production without issue.
Finally I found the problem is about the socket. We got the size of data by this method, and read data by size. But I can't pass the validation about size. The real size of data is smaller than data size which got from TCPSocket#getc
before.
So protobuf
will not run the next code if two size is not equal.
I don't know why it happened. I use the gem
protobuf-rpc-register
. There are callbacks in this method. And I found no callback be called even I addedon_complete
.