Sync develop with master #4

Merged
RoshanSyed merged 144 commits from master into develop 2019-12-16 15:20:56 +00:00
2 changed files with 17 additions and 9 deletions
Showing only changes of commit cfc53e8b82 - Show all commits

View file

@ -98,9 +98,13 @@ void http_api_connection::on_request( const fc::http::request& req, const fc::ht
auto call = var.as<fc::rpc::request>();
try
{
auto result = _rpc_state.local_call( call.method, call.params );
resp_body = fc::json::to_string( fc::rpc::response( *call.id, result ) );
resp_status = http::reply::OK;
try
{
auto result = _rpc_state.local_call( call.method, call.params );
resp_body = fc::json::to_string( fc::rpc::response( *call.id, result ) );
resp_status = http::reply::OK;
}
FC_CAPTURE_AND_RETHROW( (call.method)(call.params) );
}
catch ( const fc::exception& e )
{

View file

@ -96,14 +96,18 @@ std::string websocket_api_connection::on_message(
exception_ptr optexcept;
try
{
auto result = _rpc_state.local_call( call.method, call.params );
if( call.id )
try
{
auto reply = fc::json::to_string( response( *call.id, result ) );
if( send_message )
_connection.send_message( reply );
return reply;
auto result = _rpc_state.local_call( call.method, call.params );
if( call.id )
{
auto reply = fc::json::to_string( response( *call.id, result ) );
if( send_message )
_connection.send_message( reply );
return reply;
}
}
FC_CAPTURE_AND_RETHROW( (call.method)(call.params) )
}
catch ( const fc::exception& e )
{