Detect closed connection on receive.