em-rtmp 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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