fix false disconnect due to a signal sent to the reading process