MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / handleTLSerrors

Function handleTLSerrors

map-chat/javascript/browserMqtt.js:885–897  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

883 */
884 /*jshint latedef:false*/
885 function handleTLSerrors (err) {
886 // How can I get verify this error is a tls error?
887 if (opts.rejectUnauthorized) {
888 mqttClient.emit('error', err);
889 }
890
891 // close this connection to match the behaviour of net
892 // otherwise all we get is an error from the connection
893 // and close event doesn't fire. This is a work around
894 // to enable the reconnect code to work the same as with
895 // net.createConnection
896 connection.end();
897 }
898 /*jshint latedef:false*/
899
900 connection.on('error', handleTLSerrors);

Callers

nothing calls this directly

Calls 1

emitMethod · 0.80

Tested by

no test coverage detected