This implements a handler at https://[snowflake-broker]/metrics for the
snowflake collecTor module to fetch stats from the broker. Logged
metrics are copied out to the response with a text/plain; charset=utf-8
content type. This implements bug #31376.
This is similar to the deadlock bug in the proxy-go instances. If the
proxy-pair sends an answer to the broker, it previously assumed that the
datachannel would be opened and the pair reused only once the
datachannel closed. However, sometimes the datachannel never opens due
to ICE errors or a misbehaving/buggy client causing the proxy to
infinitely loop and the proxy-pair to remain active.
This commit reuses the pair.running attribute to indicate whether or not
the datachannel has been opened and sets a timeout to close the
proxy-pair if it has not been opened by that time.
Make sure to set proxypair.active to false if createAnswer or
setLocalDescription fails. This should prevent one edge case the results
in an infinite loop described in ticket #31100.
The mozilla addon update failed with an error
`Error: Icon at "icons/status-on.png" must be square.`
I fixed the icon in the manifest to be 60x60 pixels.
There were two problems having to do with looking up in the UNITS
object. (1) It was checking for undefined keys by comparing to null,
rather than undefined. (2) It was finding Object.prototype keys like
"toString".
This standard interface does the same thing as Query.parse did, with a
different API on the return value. It doesn't have the problems with
keys inherited from Object.prototype that Query.parse did.
Some files were omitted in the .eslintignore, left as an exercise to the
reader.
We probably want to reduce amount of globals overall and use proper es
modules.
No idea why but, with it, when a client disconnects the datachannel
doesn't close. This wasn't an issue prior to 359600d since the
configuration wasn't being passed to the peerconnection constructor.
This probably just makes the url invalid and falls back to a default in
libwebrtc.