Opened 3 months ago

Last modified 2 months ago

#34278 new task

Handling connection failures.

Reported by: HashikD Owned by:
Priority: Medium Milestone:
Component: Circumvention/Snowflake Version:
Severity: Normal Keywords: snowflake-mobile
Cc: cohosh, phw, arlolra, dcf, HashikD Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Checking to see if the connection is dropping for any reason like Android OS killing the service, connection time outs, etc.

Child Tickets

Change History (8)

comment:1 Changed 3 months ago by cohosh

Keywords: snowflake-mobile added

Add snowflake-mobile keyword to Hashik's GSoC 2020 tickets.

comment:2 Changed 3 months ago by HashikD

Keywords: Snowflake_Android added

comment:3 Changed 3 months ago by HashikD

Keywords: Snowflake_Android removed

comment:4 Changed 3 months ago by cohosh

Cc: HashikD added

comment:5 Changed 3 months ago by HashikD

Hey! what is considered as a connection termination or failure of the client for (or client leaving) Snowflake proxy?

What is the final state that I should look for to mark the end of the connection for WebRTC; to go ahead and close the connections and restart a the SDP offer request from the broker?

In onIceConnectionChange what is the final state that I should look for:
here are the list of state

I am getting mixed answers, sometimes it's logging "Failed" as the final state other times "closed".

Feel free to ask for clarification if I am not clear enough.

comment:6 Changed 2 months ago by cohosh

Status: newneeds_information

comment:7 Changed 2 months ago by cohosh

This is a really good question, and one that we've worked on with the other proxy implementations.

There are a few things we can look for to close a connection. In the Google API, there should be an OnClose event: https://webrtc.org/getting-started/data-channels#open_and_close_events
that we can add a listener to. You can see that in our Javascript proxy code here.

We also want to close if there is an error (see here).

We also added a timeout as an extra check. We can do this because the underlying layer is sending keep-alive messages every 10 seconds. You can see that in the existing code here.

We also want to close the connection if it is closed or we receive an error from the WebSocket side. See here.

comment:8 Changed 2 months ago by cohosh

Status: needs_informationnew
Note: See TracTickets for help on using tickets.