Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
a18c543c
Commit
a18c543c
authored
Mar 18, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ObjServiceClientManager 创建objClient时,没有地址,创建连接到0.0.0.1:12345, 不可能存在的地址。避免通讯出错
parent
60be6282
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
FObjServiceClientManager.cs
Project.FLY.FObjSys/FObjSys/FObjServiceClientManager.cs
+7
-4
No files found.
Project.FLY.FObjSys/FObjSys/FObjServiceClientManager.cs
View file @
a18c543c
...
...
@@ -33,12 +33,14 @@ namespace FObjBase
return
instance
;
}
}
/// <summary>
/// 连接地址
/// </summary>
[
JsonProperty
]
public
List
<
ConnAddr
>
ConnAddrs
=
new
List
<
ConnAddr
>();
public
List
<
ConnAddr
>
ConnAddrs
{
get
;
}
=
new
List
<
ConnAddr
>();
/// <summary>
/// 连接到 另一个Obj系统
/// </summary>
...
...
@@ -52,7 +54,9 @@ namespace FObjBase
if
(
connaddr
==
null
)
{
//没有,那就创建一个
connaddr
=
new
ConnAddr
()
{
ConnName
=
connName
,
Addr
=
"127.0.0.1:20006"
};
//创建连接到不存在的地址,避免出错
connaddr
=
new
ConnAddr
()
{
ConnName
=
connName
,
Addr
=
"0.0.0.1:12345"
};
ConnAddrs
.
Add
(
connaddr
);
}
foreach
(
var
id
in
fObjClient
.
GetIDs
())
...
...
@@ -121,8 +125,7 @@ namespace FObjBase
{
string
json
=
File
.
ReadAllText
(
filename
);
JsonConvert
.
PopulateObject
(
json
,
this
);
if
(
this
.
ConnAddrs
==
null
)
this
.
ConnAddrs
=
new
List
<
ConnAddr
>();
}
catch
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment