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
462b7e1c
Commit
462b7e1c
authored
Feb 20, 2019
by
oroulet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better fix for ids not being a list
parent
d5420d79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
opcua/server/internal_server.py
opcua/server/internal_server.py
+2
-3
opcua/server/subscription_service.py
opcua/server/subscription_service.py
+1
-1
No files found.
opcua/server/internal_server.py
View file @
462b7e1c
...
...
@@ -5,12 +5,11 @@ Can be used on server side or to implement binary/https opc-ua servers
from
datetime
import
datetime
,
timedelta
from
copy
import
copy
from
struct
import
unpack_from
,
unpack
from
struct
import
unpack_from
import
os
import
asyncio
import
logging
from
enum
import
Enum
from
copy
import
copy
,
deepcopy
from
urllib.parse
import
urlparse
from
typing
import
Coroutine
...
...
@@ -344,7 +343,7 @@ class InternalSession:
async
def
close_session
(
self
,
delete_subs
=
True
):
self
.
logger
.
info
(
'close session %s'
)
self
.
state
=
SessionState
.
Closed
await
self
.
delete_subscriptions
(
self
.
subscription_service
.
subscriptions
.
keys
(
))
await
self
.
delete_subscriptions
(
list
(
self
.
subscription_service
.
subscriptions
.
keys
()
))
def
activate_session
(
self
,
params
):
self
.
logger
.
info
(
'activate session'
)
...
...
opcua/server/subscription_service.py
View file @
462b7e1c
...
...
@@ -41,7 +41,7 @@ class SubscriptionService:
self
.
logger
.
info
(
"delete subscriptions: %s"
,
ids
)
res
=
[]
existing_subs
=
[]
for
i
in
list
(
ids
)
:
for
i
in
ids
:
sub
=
self
.
subscriptions
.
pop
(
i
,
None
)
if
sub
is
None
:
res
.
append
(
ua
.
StatusCode
(
ua
.
StatusCodes
.
BadSubscriptionIdInvalid
))
...
...
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