This commit is contained in:
skidoodle 2024-10-10 21:43:06 +02:00
parent b5fe22bdc0
commit 15cccfcb20
Signed by: albert
GPG key ID: A06E3070D7D55BF2

View file

@ -78,7 +78,9 @@ func main() {
// ConnectionHandler upgrades HTTP connections to WebSocket and handles communication with clients // ConnectionHandler upgrades HTTP connections to WebSocket and handles communication with clients
func ConnectionHandler(w http.ResponseWriter, r *http.Request) { func ConnectionHandler(w http.ResponseWriter, r *http.Request) {
ws, err := upgrader.Upgrade(w, r, nil) ws, err := upgrader.Upgrade(w, r, nil)
if err != nil {return} if err != nil {
return
}
connect <- ws connect <- ws
defer func() { defer func() {