diff --git a/pkg/sfu/datachannel.go b/pkg/sfu/datachannel.go index f145d68b3..497af0946 100644 --- a/pkg/sfu/datachannel.go +++ b/pkg/sfu/datachannel.go @@ -11,10 +11,10 @@ type ( // The datachannels created will be negotiated on join to all peers that joins // the SFU. Datachannel struct { - Label string - middlewares []func(MessageProcessor) MessageProcessor - onMessage func(ctx context.Context, args ProcessArgs) - onRemovePeer func( peer Peer ) + Label string + middlewares []func(MessageProcessor) MessageProcessor + onMessage func(ctx context.Context, args ProcessArgs) + onRemovePeer func(peer Peer) } ProcessArgs struct { diff --git a/pkg/sfu/subscriber.go b/pkg/sfu/subscriber.go index 45d8c53ba..ca002ce83 100644 --- a/pkg/sfu/subscriber.go +++ b/pkg/sfu/subscriber.go @@ -95,7 +95,7 @@ func (s *Subscriber) AddDatachannel(peer Peer, dc *Datachannel) error { }) ndc.OnClose(func() { if dc.onRemovePeer != nil { - dc.onRemovePeer( peer ) + dc.onRemovePeer(peer) } })