em-rtmp 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/em-rtmp/io_helpers.rb +6 -6
- data/lib/em-rtmp/version.rb +1 -1
- metadata +1 -1
data/lib/em-rtmp/io_helpers.rb
CHANGED
@@ -175,12 +175,12 @@ module EventMachine
|
|
175
175
|
def read_safe(length)
|
176
176
|
raise ArgumentError, "cannot read nothing: #{length}" unless length && length >= 1
|
177
177
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
178
|
+
if value = read(length)
|
179
|
+
return value
|
180
|
+
else
|
181
|
+
Logger.error "unable to read from socket, closing connection"
|
182
|
+
close_connection
|
183
|
+
""
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
data/lib/em-rtmp/version.rb
CHANGED