Currently RCON connections will panic because the RCON.rcon field is nil upon call to NewRCON, despite created being set to the current time. Because created is set to the current time, runRCONCommand will not call RCON.Reconnect to establish a connection to the server, resulting a panic due to accessing a nil pointer. This PR sets the initial created time to Unix Epoch time, ensuring that the connection to the RCON server is established.
Currently RCON connections will panic because the
RCON.rcon
field is nil upon call toNewRCON
, despitecreated
being set to the current time. Becausecreated
is set to the current time,runRCONCommand
will not callRCON.Reconnect
to establish a connection to the server, resulting a panic due to accessing a nil pointer. This PR sets the initialcreated
time to Unix Epoch time, ensuring that the connection to the RCON server is established.