Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
srvpro
Commits
c9102370
Commit
c9102370
authored
Nov 14, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'neos' into cloudrep-chat
parents
f19e7d6d
224f8da0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
ygopro-server.coffee
ygopro-server.coffee
+4
-4
ygopro-server.js
ygopro-server.js
+9
-9
No files found.
ygopro-server.coffee
View file @
c9102370
...
...
@@ -852,7 +852,7 @@ CLIENT_kick = global.CLIENT_kick = (client) ->
if
!
client
return
false
client
.
system_kicked
=
true
if
settings
.
modules
.
reconnect
.
enabled
and
client
.
c
losed
if
settings
.
modules
.
reconnect
.
enabled
and
client
.
isC
losed
if
client
.
server
and
!
client
.
had_new_reconnection
room
=
ROOM_all
[
client
.
rid
]
if
room
...
...
@@ -1803,8 +1803,8 @@ netRequestHandler = (client) ->
# 释放处理
closeHandler
=
(
error
)
->
#log.info "client closed", client.name, had_error
#
log.info "disconnect", client.ip, ROOM_connected_ip[client.ip]
log
.
info
"client closed"
,
client
.
name
,
error
,
client
.
closed
log
.
info
"disconnect"
,
client
.
ip
,
ROOM_connected_ip
[
client
.
ip
]
if
client
.
closed
return
room
=
ROOM_all
[
client
.
rid
]
...
...
@@ -1817,7 +1817,7 @@ netRequestHandler = (client) ->
CLIENT_heartbeat_unregister
(
client
)
if
room
if
!
CLIENT_reconnect_register
(
client
,
client
.
rid
,
error
)
room
.
disconnect
(
client
)
room
.
disconnect
(
client
,
error
)
else
if
!
client
.
had_new_reconnection
SERVER_kick
(
client
.
server
)
return
...
...
ygopro-server.js
View file @
c9102370
...
...
@@ -1119,7 +1119,7 @@
return
false
;
}
client
.
system_kicked
=
true
;
if
(
settings
.
modules
.
reconnect
.
enabled
&&
client
.
c
losed
)
{
if
(
settings
.
modules
.
reconnect
.
enabled
&&
client
.
isC
losed
)
{
if
(
client
.
server
&&
!
client
.
had_new_reconnection
)
{
room
=
ROOM_all
[
client
.
rid
];
if
(
room
)
{
...
...
@@ -2432,8 +2432,8 @@
// 释放处理
closeHandler
=
function
(
error
)
{
var
room
;
//log.info "client closed", client.name, had_error
//log.info "disconnect", client.ip, ROOM_connected_ip[client.ip]
log
.
info
(
"
client closed
"
,
client
.
name
,
error
,
client
.
closed
);
log
.
info
(
"
disconnect
"
,
client
.
ip
,
ROOM_connected_ip
[
client
.
ip
]);
if
(
client
.
closed
)
{
return
;
}
...
...
@@ -2449,7 +2449,7 @@
}
if
(
room
)
{
if
(
!
CLIENT_reconnect_register
(
client
,
client
.
rid
,
error
))
{
room
.
disconnect
(
client
);
room
.
disconnect
(
client
,
error
);
}
}
else
if
(
!
client
.
had_new_reconnection
)
{
SERVER_kick
(
client
.
server
);
...
...
@@ -2459,17 +2459,17 @@
client
.
on
(
'
close
'
,
function
(
code
,
reason
)
{
return
closeHandler
();
});
client
.
on
(
'
timeout
'
,
function
()
{
if
(
!
(
settings
.
modules
.
reconnect
.
enabled
&&
(
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
||
client
.
had_new_reconnection
)))
{
client
.
destroy
();
}
});
}
else
{
client
.
on
(
'
close
'
,
function
(
had_error
)
{
return
closeHandler
(
had_error
!=
null
?
had_error
:
{
'
unknown
'
:
void
0
});
});
client
.
on
(
'
timeout
'
,
function
()
{
if
(
!
(
settings
.
modules
.
reconnect
.
enabled
&&
(
disconnect_list
[
CLIENT_get_authorize_key
(
client
)]
||
client
.
had_new_reconnection
)))
{
client
.
destroy
();
}
});
}
client
.
on
(
'
error
'
,
closeHandler
);
server
.
on
(
'
close
'
,
function
(
had_error
)
{
...
...
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