Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
541c38b7
Commit
541c38b7
authored
Jun 26, 2022
by
zhaodice
Committed by
Melledy
Jun 26, 2022
Browse files
Avoid disconnection notification
parent
b5fd8c1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/recv/HandlerPlayerForceExitReq.java
View file @
541c38b7
...
@@ -12,6 +12,17 @@ public class HandlerPlayerForceExitReq extends PacketHandler {
...
@@ -12,6 +12,17 @@ public class HandlerPlayerForceExitReq extends PacketHandler {
public
void
handle
(
GameSession
session
,
byte
[]
header
,
byte
[]
payload
)
throws
Exception
{
public
void
handle
(
GameSession
session
,
byte
[]
header
,
byte
[]
payload
)
throws
Exception
{
// Client should auto disconnect right now
// Client should auto disconnect right now
session
.
send
(
new
BasePacket
(
PacketOpcodes
.
PlayerForceExitRsp
));
session
.
send
(
new
BasePacket
(
PacketOpcodes
.
PlayerForceExitRsp
));
session
.
close
();
new
Thread
(){
@Override
public
void
run
()
{
try
{
Thread
.
sleep
(
1000
);
// disconnect after 1 seconds
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
session
.
close
();
super
.
run
();
}
}.
start
();
}
}
}
}
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