Also check for SOCKET.was_error when accessing the socket data.
This commit is contained in:
@@ -42,7 +42,7 @@ feature -- Input
|
||||
src: like source
|
||||
do
|
||||
src := source
|
||||
if src.readable then
|
||||
if src.readable and not src.was_error then
|
||||
src.read_character
|
||||
last_character := src.last_character
|
||||
else
|
||||
@@ -56,7 +56,7 @@ feature -- Input
|
||||
do
|
||||
src := source
|
||||
last_string.wipe_out
|
||||
if src.readable then
|
||||
if src.readable and not src.was_error then
|
||||
src.read_stream_thread_aware (nb)
|
||||
last_string.append_string (src.last_string)
|
||||
end
|
||||
@@ -85,11 +85,11 @@ feature -- Status report
|
||||
end_of_input: BOOLEAN
|
||||
-- Has the end of input stream been reached?
|
||||
do
|
||||
Result := not source.readable
|
||||
Result := not source.readable or source.was_error
|
||||
end
|
||||
|
||||
;note
|
||||
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
|
||||
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
|
||||
source: "[
|
||||
Eiffel Software
|
||||
|
||||
Reference in New Issue
Block a user