Skip to content

Commit

Permalink
Unregister address while closing
Browse files Browse the repository at this point in the history
  • Loading branch information
lchenut committed Mar 21, 2024
1 parent 654a69a commit 4b9c506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webrtc/sctp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ logScope:
# TODO:
# - Replace doAssert by a proper exception management
# - Find a clean way to manage SCTP ports
# - Unregister address when closing

proc perror(error: cstring) {.importc, cdecl, header: "<errno.h>".}
proc printf(format: cstring) {.cdecl, importc: "printf", varargs, header: "<stdio.h>", gcsafe.}
Expand Down Expand Up @@ -178,6 +177,7 @@ proc write*(self: SctpConn, s: string) {.async.} =
proc close*(self: SctpConn) {.async.} =
self.usrsctpAwait:
self.sctpSocket.usrsctp_close()
usrsctp_deregister_address(cast[pointer](self))

# -- usrsctp receive data callbacks --

Expand Down

0 comments on commit 4b9c506

Please sign in to comment.