[PATCH] Add timeout to callbacks waiting for enough entropy (#1073679)