File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ icon_path = "server_icon.png"
25
25
success = " Hello, §6{{NAME}}§r! Your code is: §a{{CODE}}"
26
26
bad_session = " §cFailed to login: Invalid session (Try restarting your game and the launcher)"
27
27
using_proxy = " §cYou are using a proxy!"
28
+ internal_error = " §cSorry, internal server error occurred"
Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ icon_path = "server_icon.png"
25
25
success = " Hello, §6{{NAME}}§r! Your code is: §a{{CODE}}"
26
26
bad_session = " §cFailed to login: Invalid session (Try restarting your game and the launcher)"
27
27
using_proxy = " §cYou are using a proxy!"
28
+ internal_error = " §cSorry, internal server error occurred"
Original file line number Diff line number Diff line change @@ -94,4 +94,7 @@ pub struct Messages {
94
94
95
95
/// Using a proxy
96
96
pub using_proxy : String ,
97
+
98
+ /// Message for internal server error
99
+ pub internal_error : String ,
97
100
}
Original file line number Diff line number Diff line change @@ -77,7 +77,12 @@ impl MinecraftServer {
77
77
"Connection from {:?} closed successfully" ,
78
78
self . session. addr
79
79
) ,
80
- Err ( e) => error ! ( "Internal error occurred: {}" , e) ,
80
+ Err ( e) => {
81
+ let _ = self
82
+ . send_disconnect ( self . config . messages . internal_error . clone ( ) )
83
+ . await ;
84
+ error ! ( "Internal error occurred: {}" , e)
85
+ }
81
86
}
82
87
}
83
88
You can’t perform that action at this time.
0 commit comments