Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Created December 5, 2018 16:08
Show Gist options
  • Select an option

  • Save michaelsbradleyjr/720aca8915be0767cc44894d6a4eb686 to your computer and use it in GitHub Desktop.

Select an option

Save michaelsbradleyjr/720aca8915be0767cc44894d6a4eb686 to your computer and use it in GitHub Desktop.
modified src/lib/utils/utils.js
@@ -96,15 +96,15 @@ function pingEndpoint(host, port, type, protocol, origin, callback) {
host: host,
port: port
};
- if (type === 'ws') {
- options.headers = {
- 'Sec-WebSocket-Version': 13,
- Connection: 'Upgrade',
- Upgrade: 'websocket',
- 'Sec-WebSocket-Extensions': 'permessage-deflate; client_max_window_bits',
- Origin: origin
- };
- }
+ // if (type === 'ws') {
+ // options.headers = {
+ // 'Sec-WebSocket-Version': 13,
+ // Connection: 'Upgrade',
+ // Upgrade: 'websocket',
+ // 'Sec-WebSocket-Extensions': 'permessage-deflate; client_max_window_bits',
+ // Origin: origin
+ // };
+ // }
let req;
// remove trailing api key from infura, ie rinkeby.infura.io/nmY8WtT4QfEwz2S7wTbl
if (options.host.indexOf('/') > -1) {
@@ -124,9 +124,9 @@ function pingEndpoint(host, port, type, protocol, origin, callback) {
callback();
});
- req.on('upgrade', (_res, _socket, _head) => {
- callback();
- });
+ // req.on('upgrade', (_res, _socket, _head) => {
+ // callback();
+ // });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment