Details
-
Question
-
Status: Resolved
-
Major
-
Resolution: Information Provided
-
0.10.0
-
None
-
None
Description
Client gets info from the server and terminates succesfully.
But Server crashes when client TBufferedTransport calls close().
Client code:
int main() { std::cout << "C++ client in network mode start..." << std::endl; shared_ptr<AllowAllAccessManager> acc_mgr(new AllowAllAccessManager()); shared_ptr<apache::thrift::transport::TSSLSocketFactory> ssl_tx_transp_factory( new qkd_api_client::SSLSocketTransportFactory(CLIENT_TX_CERT_PATH, CLIENT_TX_KEY_PATH, TRUSTED_CA_PATH, acc_mgr) ); shared_ptr<TBufferedTransport> transp_tx( new TBufferedTransport(ssl_tx_transp_factory->createSocket(TX_SERVER_ADDR, SERVER_PORT))); auto client_tx = qkd_network_api::v1::NetworkApiServiceClient(boost::shared_ptr<TProtocol>(new TBinaryProtocol(transp_tx))); try { transp_tx->open(); qkd_network_api::v1::Info info_tx; client_tx.get_by_length(info_tx, 22, 33); transp_tx->close() ...
Server output:
write 0x00007f2a0992c1cd <unknown> 0x00007f2a07d65d05 BIO_write 0x00007f2a07d607cb <unknown> 0x00007f2a08165c9b <unknown> 0x00007f2a081664d0 <unknown> 0x00007f2a0816e9b1 <unknown> 0x00007f2a0816ce05 SSL_shutdown 0x00007f2a081770c9 apache::thrift::transport::TSSLSocket::close 0x00007f2a0842aa51 apache::thrift::server::TConnectedClient::cleanup 0x00007f2a08433196 apache::thrift::server::TConnectedClient::run 0x00007f2a08432d65 apache::thrift::server::TThreadedServer::TConnectedClientRunner::run 0x00007f2a0843a5f8 apache::thrift::concurrency::PthreadThread::threadMain 0x00007f2a0843e5ff start_thread 0x00007f2a099234a4 clone 0x00007f2a051e2d0f
If client open() and close() transport without calling interface method - server works fine.
...
transp_tx->open();
// client_tx.get_by_length(info_tx, 22, 33);
transp_tx->close()
...
When I use python client - all works fine.
Help me, please.