Minor fix solving a ConcurrentModificationException
This commit is contained in:
parent
75a505c63f
commit
d593cf379e
@ -15,7 +15,7 @@ Don't worry about privacy or security: all data is stored in your browser locall
|
||||
* Real-time connected players, machine CPU and server RAM usage information.
|
||||
* Capable of keeping active connections to more than one server to keep retrieving console log in the background for them all.
|
||||
* English, Spanish, Chinese (thanks to Neubulae and OPhantomO), Czech (thanks to Tada), Deutsch (thanks to NoNamePro0), Dutch (thanks to Twockx), French (thanks to pickatchou999), Italian (thanks to AlexZap), Korean (thanks to XxPKBxX), Portuguese (thanks to AlexandreMuassab and Connect500BR), Russian (thanks to Stashenko) and Turkish (thanks to acarnd03) supported.
|
||||
* Free, updated regularly, and many more!
|
||||
* Free!
|
||||
|
||||

|
||||
|
||||
|
@ -22,8 +22,8 @@ function setLanguage(locale){
|
||||
"addServerModalSvName": "Server name:",
|
||||
"addServerModalSvIp": "Server IP:",
|
||||
"addServerModalSvPort": "WebConsole port:",
|
||||
"addServerModalSvSsl": "Server is SSL enabled",
|
||||
"addServerModalSslAdvice": "SSL is required for HTTPS client connections",
|
||||
"addServerModalSvSsl": "SSL is enabled on the server",
|
||||
"addServerModalSslAdvice": "SSL is required for connections made from HTTPS websites",
|
||||
"addServerModalClose": "Close",
|
||||
"saveAndConnectServerButton": "Save and connect",
|
||||
"passwordModalLongTitle": "Password required",
|
||||
|
@ -52,7 +52,7 @@ public class WebConsole extends JavaPlugin {
|
||||
try {
|
||||
server.stop();
|
||||
wsThread = null;
|
||||
} catch (IOException | InterruptedException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class LoginManager {
|
||||
* @param address User to logout
|
||||
*/
|
||||
public void logOut(InetSocketAddress address) {
|
||||
for(ConnectedUser user : loggedInUsers)
|
||||
for(ConnectedUser user : loggedInUsers.toArray(new ConnectedUser[loggedInUsers.size()]))
|
||||
if(user.getSocketAddress().equals(address))
|
||||
loggedInUsers.remove(user);
|
||||
}
|
||||
|
@ -105,6 +105,7 @@ public class WSServer extends WebSocketServer {
|
||||
try {
|
||||
conn.send(content.toJSON());
|
||||
}catch(WebsocketNotConnectedException e) {
|
||||
LoginManager.getInstance().logOut(conn.getRemoteSocketAddress());
|
||||
Bukkit.getLogger().warning(Internationalization.getPhrase("error-disconnected-client"));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user