Also remove the useless shebang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668973
13f79535-47bb-0310-9956-
ffa450edef68
-#!/usr/bin/env ruby
-#
# Copyright (c) 2006- Facebook
# Distributed under the Thrift Software License
#
def read(sz)
begin
data = @handle.recv(sz)
- if (data.length == 0)
- raise TransportException.new("Socket: Could not read #{sz} bytes from #{@host}:#{@port}")
- end
- return data
rescue StandardError
raise TransportException.new(TransportException::NOT_OPEN)
end
+ if (data.length == 0)
+ raise TransportException.new(TransportException::UNKNOWN, "Socket: Could not read #{sz} bytes from #{@host}:#{@port}")
+ end
+ return data
end
def close