Exact Riemann solver for non-convex relativistic hydrodynamics