We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the below Mux HandlerFunc works well.
func WsHandler(rw http.ResponseWriter, r *http.Request) { ws, err := upgradeConn.Upgrade(rw, r, nil) if err != nil { log.Println(err) } log.Println("connected to the ws ep.") conn := WsConn{ws} clients[conn] = WsConnDetail{} go WsListener(&conn) }
but the WS connection is not available after building the application docker image and running the container.
docker-compose
version: "3.8" services: core: container_name: webrtc_service build: context: . dockerfile: Dockerfile image: rtc restart: always ports: - "8080:8080" networks: - admin-service ``` ### Anything else? Dockerfile ``` FROM golang:1.21.6 WORKDIR /app COPY . . ENV GO111MODULE on ENV GOPROXY https://goproxy.cn # RUN go test -v . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main presenter/main.go RUN chmod x main CMD ["/app/main"] ```
The text was updated successfully, but these errors were encountered:
What is the log output of WsHandler? Specifically, does upgradeConn.Upgrade return an error?
As a side note, there are bugs in WsHandler.
clients[conn] = WsConnDetail{}
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
Current Behavior
the below Mux HandlerFunc works well.
Expected Behavior
but the WS connection is not available after building the application docker image and running the container.
Steps To Reproduce
docker-compose
The text was updated successfully, but these errors were encountered: