Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
ce7cc527
Commit
ce7cc527
authored
Jul 17, 2022
by
Alexander Schrode
Committed by
oroulet
Jul 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always close secure channel
parent
85ff8559
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
asyncua/client/client.py
asyncua/client/client.py
+18
-7
No files found.
asyncua/client/client.py
View file @
ce7cc527
...
...
@@ -209,8 +209,10 @@ class Client:
try
:
await
self
.
send_hello
()
await
self
.
open_secure_channel
()
endpoints
=
await
self
.
get_endpoints
()
await
self
.
close_secure_channel
()
try
:
endpoints
=
await
self
.
get_endpoints
()
finally
:
await
self
.
close_secure_channel
()
finally
:
self
.
disconnect_socket
()
return
endpoints
...
...
@@ -223,8 +225,10 @@ class Client:
try
:
await
self
.
send_hello
()
await
self
.
open_secure_channel
()
# spec says it should not be necessary to open channel
servers
=
await
self
.
find_servers
()
await
self
.
close_secure_channel
()
try
:
servers
=
await
self
.
find_servers
()
finally
:
await
self
.
close_secure_channel
()
finally
:
self
.
disconnect_socket
()
return
servers
...
...
@@ -237,8 +241,10 @@ class Client:
try
:
await
self
.
send_hello
()
await
self
.
open_secure_channel
()
servers
=
await
self
.
find_servers_on_network
()
await
self
.
close_secure_channel
()
try
:
servers
=
await
self
.
find_servers_on_network
()
finally
:
await
self
.
close_secure_channel
()
finally
:
self
.
disconnect_socket
()
return
servers
...
...
@@ -253,7 +259,12 @@ class Client:
try
:
await
self
.
send_hello
()
await
self
.
open_secure_channel
()
await
self
.
create_session
()
try
:
await
self
.
create_session
()
except
Exception
:
# clean up secure channel
self
.
close_secure_channel
()
raise
except
Exception
:
# clean up open socket
self
.
disconnect_socket
()
...
...
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