tcp_session: Correctly handle EINTR when receiving data