The damn runner keeps making too many POST requests per minute to my
Gitea instance and flooding the entire access.log file, I'm gonna keep
using Goreleaser for easy binary releases but CI/CD unfortunately has to
go away
The receiveMessage() function would regularly keep casting strings based
on a 2048 byte array, this didn't seemingly pose a problem until I
noticed the RAM usage go through the roof when the client had to be
populated with the chat history of a lengthy chat log by the server. To
fix this I am now creating a second array using the number of bytes
being returned by the Read() method and copying the 2048 byte array's
contents into it, setting the former array to nil afterwards.
For some reason, writing to a conn variable on a TLS connection
appends newlines by default, so new users will have their chat box
populated if the server is using --history/-r with messages that have
unnecessary newlines
After realizing what I'd have to go through to build a functional "Users
online:" view, I have decided to NOT do that, especially because this
entire thing still runs on raw TCP messages for commmunication and
trying to tell apart regular messages from join/disconnect messages in
the client to properly update the possible new view would be hell.
Go audit / audit (pull_request) Successful in 1m48sDetails
I've finally managed to properly rebuild the project, it's not extremely
clean, but compared to before, it's infinitely more functional and
expandable.
Whenever a server would be stopped while the clients were connected to
it, the for loop handling the messages received by the server would
start a feedback loop as no more data could be read from "conn", thus
spawning an infinite number of byte arrays and crashing my laptop