{
TTransport transport = new TStreamTransport(input,output);
- TProtocol inputProtocol = null;
- TProtocol outputProtocol = null;
-
try
{
- inputProtocol = inputProtocolFactory.GetProtocol(transport);
- outputProtocol = outputProtocolFactory.GetProtocol(transport);
+ var inputProtocol = inputProtocolFactory.GetProtocol(transport);
+ var outputProtocol = outputProtocolFactory.GetProtocol(transport);
- while (processor.Process(inputProtocol, outputProtocol)) { }
+ while (processor.Process(inputProtocol, outputProtocol))
+ {
+ }
}
catch (TTransportException)
{
// Client died, just move on
}
- catch (TApplicationException tx)
- {
- Console.Error.Write(tx);
- }
- catch (Exception x)
+ finally
{
- Console.Error.Write(x);
+ transport.Close();
}
-
- transport.Close();
}
public bool IsReusable