mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 07:08:11 +00:00
fix: golangci errors
This commit is contained in:
@@ -359,10 +359,10 @@ func (c *Client) tunnel(conn net.Conn, sess *smux.Session, targetAddr string, ta
|
||||
|
||||
func (c *Client) sendConnectRequest(stream *smux.Stream, targetAddr string, targetPort int) error {
|
||||
connectReq, err := json.Marshal(map[string]any{
|
||||
"cmd": "connect",
|
||||
"client_id": c.clientID,
|
||||
"addr": targetAddr,
|
||||
"port": targetPort,
|
||||
"cmd": "connect",
|
||||
"clientId": c.clientID,
|
||||
"addr": targetAddr,
|
||||
"port": targetPort,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("sid=%d marshal connect req: %w", stream.ID(), err)
|
||||
|
||||
@@ -676,7 +676,7 @@ func (p *Peer) sendSetSlots() error {
|
||||
// generous number of slots so each subscriber can receive every active
|
||||
// publisher in the room.
|
||||
slots := make([]map[string]int, 0, 8)
|
||||
for i := 0; i < 8; i++ {
|
||||
for range 8 {
|
||||
slots = append(slots, map[string]int{"width": 1280, "height": 720})
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ type Server struct {
|
||||
// ConnectRequest is a message from the client to establish a new connection.
|
||||
type ConnectRequest struct {
|
||||
Cmd string `json:"cmd"`
|
||||
ClientID string `json:"client_id"`
|
||||
ClientID string `json:"clientId"`
|
||||
Addr string `json:"addr"`
|
||||
Port int `json:"port"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user