Skip to content

Commit

Permalink
dont reply check if we cant parse the version
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 29, 2014
1 parent 78f545b commit 2d86765
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ bool HandleCorrelatedMessage(TransportMessage transportMessage, IncomingContext

bool SenderIsV5OrNewer(TransportMessage transportMessage)
{
string version;
if (!transportMessage.Headers.TryGetValue(Headers.NServiceBusVersion, out version))
string versionString;
if (!transportMessage.Headers.TryGetValue(Headers.NServiceBusVersion, out versionString))
{
return false;
}
return Version.Parse(version).Major >= 5;
Version version;
if (!Version.TryParse(versionString, out version))
{
// if we cant parse the version assume it is not V5
return false;
}
return version.Major >= 5;
}
}
}

0 comments on commit 2d86765

Please sign in to comment.