Fix compile warning and timeout message logic in io_stream.c

Could we maybe change this condition into "revert_timeout_to_original" check that is set in the first statement?
this isn't obvious :)