New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default UDP transport makes Contact header constructed incorrectly for TCP transport #23

yarel79 opened this Issue Sep 6, 2016 · 0 comments


None yet
2 participants

yarel79 commented Sep 6, 2016

Why in RA, there is "udp" transport added by default?

If one chooses to use only TCP transport, then UDP transport still will be present anyway in transports. After RA initialization transports contains ('UDP','TCP') and two listening points will be created (for TCP and UDP).


This brings an issue when retrieving listening point:

Since map doesn't have an order defined, then getting one random entry from the map makes Contact header contain sometimes UDP instead of desired TCP.

Some details:


    public ListeningPoint getListeningPoint() {
        return this.provider.getListeningPoint();


    public ListeningPoint getListeningPoint() {
        if (this.listeningPoints.size() > 0) {
            return ((ListeningPoint) this.listeningPoints.values().iterator().next());

        return null;

listeningPoints will have UDP, TCP transports. and getListeningPoint() will return most likely UDP (most likely, since it depends per map behaviour, in my case it is always UDP).

For me it looks like a bug.

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