Skip to content

Commit

Permalink
Add timeout CLI option
Browse files Browse the repository at this point in the history
  • Loading branch information
hjr265 committed Jun 4, 2024
1 parent d4efbd0 commit 6ad1b54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ yargs.usage('$0 [options] address')
.default('f', 0)
.alias('f', 'follow')
.describe('f', 'number of times to follow redirects')
.default('t', 60000)
.alias('t', 'timeout')
.describe('t', 'socket timeout')
.default('p', null)
.alias('p', 'proxy')
.describe('p', 'SOCKS proxy')
Expand All @@ -32,7 +35,7 @@ if not yargs.argv._[0]?
yargs.showHelp()
process.exit 1

whois.lookup yargs.argv._[0], server: yargs.argv.server, follow: yargs.argv.follow, proxy: yargs.argv.proxy, verbose: yargs.argv.verbose, bind: yargs.argv.bind, (err, data) =>
whois.lookup yargs.argv._[0], server: yargs.argv.server, follow: yargs.argv.follow, timeout: yargs.argv.timeout, proxy: yargs.argv.proxy, verbose: yargs.argv.verbose, bind: yargs.argv.bind, (err, data) =>
if err?
console.log err
process.exit 1
Expand Down

0 comments on commit 6ad1b54

Please sign in to comment.