Skip to content

How to set up auto close time to release udp port on turn server after i killed my webrtc application. #141

Closed as not planned

Description

@cuiyijiee

hello, i am deploy this repository for my webrtc turn server。

what happend

i meet a small problem,my application is builded by google-webrtc on android platform,
when i killed my application without close peerconnection normally,my turn server speed almost 10 minutes to close the udp port relayed , it is terrible。
image

what i want know

1.Is it possible to modify this time by adding config parameters?
2.Is it possible to reduce this time through linux system parameters?

Thank you very much!

Activity

  1. cuiyijiee commented on Jun 28, 2020

    @cuiyijiee
    Author

    Is there a solution to this problem?

  2. cuiyijiee commented on Jun 28, 2020

    @cuiyijiee
    Author

    i tried to modify ServerConfig.ChannelBindTimeout to 2 Seconds, but it did not work.

    	s, err := turn.NewServer(turn.ServerConfig{
                     ...
    		ChannelBindTimeout: time.Duration(2) * time.Minute,
    	})
    
  3. Sean-Der commented on Dec 24, 2025

    @Sean-Der
    Member

    Hey @cuiyijiee

    Sorry I didn't respond to this sooner. I haven't put enough effort into this repo. When PeerConnections create the Allocation they get to pick how long they stay open. pion/turn is just respecting those values.

    The lifetime of the allocation controls how long that relayed port is open for.

    If anyone has ideas on how to make this less painful or maybe another TURN server has a way to make this easier I would love to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址