Skip to content

Commit

Permalink
fix scope error
Browse files Browse the repository at this point in the history
  • Loading branch information
you21979 committed Feb 9, 2018
1 parent 7f022e9 commit 0a0d6a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/init_socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ const getSocket = (protocol, options) => {
return new net.Socket();
case 'tls':
case 'ssl':
let tls;
try {
const tls = require('tls');
tls = require('tls');
} catch (e) {
throw new Error('tls package could not be loaded');
}
Expand Down

0 comments on commit 0a0d6a7

Please sign in to comment.