Avoid calling handlers in socket reader when reached EOF