Hi all,
I'm developing a service using thrift' ThreadedServer, the client uses java 
language??When the java client quits normally,everything is ok,the server side 
can close the connect ,it is fine. But if i terminal my java client before it 
invoke function TTransport.close(),the server side cannot know it. It seems 
that the server keeps the dying client thread forever.Has anyone ever had this 
kind of issue? How can I detect this situation on the server side?  I am not 
good at English. Hope that someone could understand,thx in advance.
My server side code like this:
        boost::shared_ptr<TSSLSocketFactory> sslSocketFactory(new 
TSSLSocketFactory());
        sslSocketFactory->loadPrivateKey("CertificateChain/server-key.key");
        sslSocketFactory->loadCertificate("CertificateChain/server-cert.cer");
        sslSocketFactory->authenticate(true);
        
sslSocketFactory->loadTrustedCertificates("CertificateChain/root-cert.cer");
        sslSocketFactory->ciphers("HIGH:!DSS:!aNULL@STRENGTH");
        boost::shared_ptr<TProcessorFactory> processorFactory(new 
CofcoProcessorFactoryImpl());
        boost::shared_ptr<TTransportFactory> transportFactory(new 
TBufferedTransportFactory());
        boost::shared_ptr<TProtocolFactory>  protocolFactory(new 
TBinaryProtocolFactory());
        boost::shared_ptr<TSSLServerSocket>  socket(new TSSLServerSocket(port, 
sslSocketFactory));
        TThreadedServer server(processorFactory, socket, transportFactory, 
protocolFactory);
        server.serve();

Reply via email to