mirror of
https://github.com/rcon-web-admin/rcon-web-admin.git
synced 2026-12-05 09:18:11 +00:00
updates for logging
This commit is contained in:
1 parent
8fbca5ba2f
commit
31245957d8
2 files changed
+4
-2
No files matched your search
@@ -72,7 +72,7 @@ Socket.connect = function (callback) {
|
||||
* @param error
|
||||
*/
|
||||
con.onerror = function (error) {
|
||||
console.error(new Date(), 'WebSocket Error ' + error);
|
||||
console.error('WebSocket Error ' + error);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ Socket.connect = function (callback) {
|
||||
if (typeof data.callbackId != "undefined") {
|
||||
var callbackId = data.callbackId;
|
||||
if (Socket.callbacks[callbackId] === null) {
|
||||
console.error(new Date(), "No socket callback for id " + callbackId + ", maybe dupe callback in backend?");
|
||||
console.error("No socket callback for id " + callbackId + ", maybe dupe callback in backend?");
|
||||
} else {
|
||||
Socket.callbacks[callbackId](data.messageData);
|
||||
Socket.callbacks[callbackId] = null;
|
||||
|
||||
@@ -125,6 +125,7 @@ function RconServer(id, serverData) {
|
||||
this.con.connect(function (err) {
|
||||
var serverName = serverData.host + ":" + serverData.rcon_port;
|
||||
if (err) {
|
||||
self.removeInstance();
|
||||
console.error(new Date(), "RconServer [" + serverName + "]: Connection failed");
|
||||
return;
|
||||
}
|
||||
@@ -133,6 +134,7 @@ function RconServer(id, serverData) {
|
||||
self.con.send(self.serverData.rcon_password, null, true, function (success) {
|
||||
self.injectServerMessage("Rcon authentication " + (success ? "successfull" : "invalid"));
|
||||
if (!success) {
|
||||
self.removeInstance();
|
||||
console.error(new Date(), "Invalid rcon password for server " + self.serverData.name + ":" + self.serverData.rcon_port);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user