Skip to content

Commit

Permalink
fix: assign correctly on WebRtc.new()
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Oct 31, 2024
1 parent d1cf6ea commit c91511a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions webrtc/webrtc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ type WebRTC* = ref object

proc new*(T: typedesc[WebRTC], address: TransportAddress): T =
result = T()
result = UdpTransport.new(address)
result = Stun.new(result.udp)
result = Dtls.new(result.stun)
result = Sctp.new(result.dtls)
result.udp = UdpTransport.new(address)
result.stun = Stun.new(result.udp)
result.dtls = Dtls.new(result.stun)
result.sctp = Sctp.new(result.dtls)

proc listen*(self: WebRTC) =
self.sctp.listen()
Expand Down

0 comments on commit c91511a

Please sign in to comment.