diff --git a/cmd/zr/main.go b/cmd/zr/main.go index 2285e87..5d81c74 100644 --- a/cmd/zr/main.go +++ b/cmd/zr/main.go @@ -17,6 +17,7 @@ var upgrader = websocket.Upgrader{ } func main() { + internal.InitializeContext("localhost") router := mux.NewRouter() router.HandleFunc("/", func(response http.ResponseWriter, request *http.Request) { response.Write([]byte("Zirconium server is up and running!")) diff --git a/internal/connection_handler.go b/internal/connection_handler.go index b5f1c42..09e4681 100644 --- a/internal/connection_handler.go +++ b/internal/connection_handler.go @@ -12,7 +12,9 @@ type ConnectionHandler struct { } func NewConnectionHandler() *ConnectionHandler { - return &ConnectionHandler{} + return &ConnectionHandler{ + connections: make(map[string]*OriginC2S), + } } func (ch *ConnectionHandler) HandleNewConnection(wsocket *websocket.Conn) {