5
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Lim 930bdabb55 Fix #8 assign to nil map 2019-08-31 11:20:28 +08:00
Ambrose Chua 577946bb39
HELP ME 2019-07-27 18:42:25 +08:00
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@ FROM golang:1.12-rc-alpine as build
RUN apk add --no-cache git=2.20.1-r0
WORKDIR /src
COPY go.mod go.sum .env *.go iceservers.txt ./
COPY go.mod go.sum .env *.go ./
COPY backend-protobuf/go ./backend-protobuf/go
RUN go get -d -v ./...
RUN CGO_ENABLED=0 go build -ldflags "-s -w"

View File

@ -230,6 +230,10 @@ func NewConnection(w http.ResponseWriter, r *http.Request, p httprouter.Params)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return
}
if _, ok := userTracks[user.UserId]; !ok {
userTracks[user.UserId] = make(map[string]*webrtc.Track)
}
userTracks[user.UserId][user.ClientId] = track
// Do signalling things