Skip to content

Commit

Permalink
fix lock
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Feb 15, 2017
1 parent 29f57fd commit 18ba081
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
7 changes: 4 additions & 3 deletions AtgwInnerCli/AtgwInnerCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{FBC5A92C-167B-4E57-9F3A-2CBAABDC3451}</ProjectGuid>
Expand All @@ -13,8 +13,9 @@
<DefaultLanguage>zh-CN</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
11 changes: 7 additions & 4 deletions AtgwInnerCli/atframe/gw/inner/ClientProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,19 @@ public ClientProtocol()
}
else
{
_binder_manager.Add(NativeProtocol, this);
lock (_binder_manager) {
_binder_manager.Add(NativeProtocol, this);
}
}
}

~ClientProtocol()
{
if (null != _native_protocol)
{
if (null != _native_protocol) {
libatgw_inner_v1_c_destroy(_native_protocol);
_binder_manager.Remove(_native_protocol);
lock (_binder_manager) {
_binder_manager.Remove(_native_protocol);
}
}
}

Expand Down
9 changes: 6 additions & 3 deletions AtgwInnerCli/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
{
"supports": {},
"dependencies": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile111": {}
"netstandard1.3": {}
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 atframework
Copyright (c) 2017 atframework

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 18ba081

Please sign in to comment.