[thrift] better error handling and timeouts in tSocket code

Summary: default socket send timeout to 5seconds, not infinity.
         close the socket in case of an error.

Reviewed By: cpiro

Test Plan: ran a client for slow services
     and sanity checked other client code to make sure

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665504 13f79535-47bb-0310-9956-ffa450edef68
1 file changed