Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
ops
coco
Commits
4b742525
Commit
4b742525
authored
Sep 03, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix] 修复web terminal突然关闭的问题
parent
f21329c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
httpd.py
coco/httpd.py
+3
-2
models.py
coco/models.py
+0
-4
No files found.
coco/httpd.py
View file @
4b742525
...
@@ -184,9 +184,10 @@ class ProxyNamespace(BaseNamespace):
...
@@ -184,9 +184,10 @@ class ProxyNamespace(BaseNamespace):
connection
=
Connection
.
get_connection
(
request
.
sid
)
connection
=
Connection
.
get_connection
(
request
.
sid
)
if
not
connection
:
if
not
connection
:
return
return
for
client
in
connection
.
clients
:
clients_copy
=
list
(
connection
.
clients
.
keys
())
for
client_id
in
clients_copy
:
try
:
try
:
self
.
on_logout
(
client
.
id
)
self
.
on_logout
(
client
_
id
)
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
warn
(
e
)
logger
.
warn
(
e
)
Connection
.
remove_connection
(
connection
.
id
)
Connection
.
remove_connection
(
connection
.
id
)
...
...
coco/models.py
View file @
4b742525
...
@@ -333,15 +333,11 @@ class WSProxy:
...
@@ -333,15 +333,11 @@ class WSProxy:
def
closed
(
self
):
def
closed
(
self
):
return
self
.
sock
.
_closed
return
self
.
sock
.
_closed
def
session_close
(
self
):
self
.
ws
.
on_logout
(
self
.
client_id
)
def
write
(
self
,
data
):
def
write
(
self
,
data
):
self
.
proxy
.
send
(
data
.
encode
())
self
.
proxy
.
send
(
data
.
encode
())
def
close
(
self
):
def
close
(
self
):
self
.
proxy
.
close
()
self
.
proxy
.
close
()
self
.
sock
.
close
()
def
__getattr__
(
self
,
item
):
def
__getattr__
(
self
,
item
):
return
getattr
(
self
.
sock
,
item
)
return
getattr
(
self
.
sock
,
item
)
...
...
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