Miguel Gonzalez Lopez created THRIFT-3894:
---------------------------------------------
Summary: Connection on error EPIPE not handled properly
Key: THRIFT-3894
URL: https://issues.apache.org/jira/browse/THRIFT-3894
Project: Thrift
Issue Type: Bug
Components: Node.js - Library
Affects Versions: 0.9.3
Environment: Mac OSx, Node 6.3.0
Reporter: Miguel Gonzalez Lopez
When the client gets the error
Error Code: EPIPE
Error Message: Error: This socket has been ended by the other party
It is expected the connection to have the "connected" property to false,
currently it is never changed.
To reproduce:
- Start Example Server
- Start Client (with added loop below)
- Kill Server
Loop to include on client.
{code:javascript}
setInterval(function(){
if(connection.connected){
client.add(1, 2, function(err, response) {
if(err) console.error(err);
//Expected a 3
console.log(response);
});
} else {
//Expected if the connection is closed, for example when the server was
killed.
console.error("The connection is closed");
}
}, 5000);
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)