Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Zhang committed Jul 19, 2017
1 parent 35b3ae0 commit 9310d57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions neo/Core/AssetState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ void ICloneable<AssetState>.FromReplica(AssetState replica)
private Dictionary<CultureInfo, string> _names;
public string GetName(CultureInfo culture = null)
{
if (AssetType == AssetType.SystemShare) return "NEO";
if (AssetType == AssetType.SystemCoin) return "NeoGas";
if (_names == null)
{
JObject name_obj;
Expand Down
3 changes: 3 additions & 0 deletions neo/Network/TcpRemoteNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private void OnConnected()
protected override async Task<Message> ReceiveMessageAsync(TimeSpan timeout)
{
CancellationTokenSource source = new CancellationTokenSource(timeout);
//Stream.ReadAsync doesn't support CancellationToken
//see: https://stackoverflow.com/questions/20131434/cancel-networkstream-readasync-using-tcplistener
source.Token.Register(() => Disconnect(true));
try
{
return await Message.DeserializeFromAsync(stream, source.Token);
Expand Down
2 changes: 1 addition & 1 deletion neo/neo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Copyright>2015-2017 The Neo Project</Copyright>
<AssemblyTitle>Neo</AssemblyTitle>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Authors>The Neo Project</Authors>
<TargetFrameworks>netstandard1.6;net461</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down

0 comments on commit 9310d57

Please sign in to comment.