private int getTimeout() throws SQLException { // input and output protocol are identical in our usage TTransport socket = this.clientService.getInputProtocol().getTransport(); if (socket instanceof SocketTimeout) { try { return ((SocketTimeout)socket).getSoTimeout(); } catch (SocketException se) { throw informListeners(ThriftExceptionUtil.newSQLException( SQLState.SOCKET_EXCEPTION, se, se.getMessage())); } } else { return 0; } } }