Standalone proxy reconnects in a tight loop when server refuses connection
Run the proxy and let it connect to a broker port that refuses connections. After the probetest (about 30 s), it starts trying to poll the broker in a tight loop. We should probably wait at least pollInterval
between connection attempts in case of error.
snowflake/proxy$ ./proxy -broker http://localhost:9999/ 2>&1 | head -n 50
2021/07/19 18:00:04 starting
2021/07/19 18:00:04 WebRTC: Created offer
2021/07/19 18:00:04 WebRTC: Set local description
2021/07/19 18:00:04 Offer: {...}
2021/07/19 18:00:35 error polling probe: http2: timeout awaiting response headers
2021/07/19 18:00:35 NAT type: unknown
2021/07/19 18:00:35 error polling broker: dial tcp [scrubbed]: connect: connection refused
2021/07/19 18:00:35 Error reading broker response: unexpected end of JSON input
2021/07/19 18:00:35 body:
2021/07/19 18:00:35 bad offer from broker
2021/07/19 18:00:35 error polling broker: dial tcp [scrubbed]: connect: connection refused
2021/07/19 18:00:35 Error reading broker response: unexpected end of JSON input
2021/07/19 18:00:35 body:
2021/07/19 18:00:35 bad offer from broker
2021/07/19 18:00:35 error polling broker: dial tcp [scrubbed]: connect: connection refused
...