thesamet / rpcz

RPC implementation for Protocol Buffers over ZeroMQ
http://code.google.com/p/rpcz/
Apache License 2.0
110 stars 42 forks source link

Client crash when using protobuf3.1 #19

Open gitgoready opened 7 years ago

gitgoready commented 7 years ago

compile proto files("syntax=proto3") using protobuf3.1,server run ok and got client request,client crash with Application_error(0)

gitgoready commented 7 years ago

Acturely it's rpc_response_header_status_code_INACTIVE in rpc_channel_impl::handle_client_response

gitgoready commented 7 years ago

Ok,it's an proto2 to proto3 error, enum default value are set to the first one, zero now. change rpcz.proto to message rpc_response_header { enum status_code { OK = 0; // Done
ACTIVE = 1; INACTIVE = 2;

and class connection_manager enum definition to class connection_manager { public: enum status { DONE = 0, INACTIVE = 1, ACTIVE = 2,

recompile and proto3 ok now.