diff options
-rwxr-xr-x | index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/index.js b/index.js index 03b5bb1..6e83e8a 100755 --- a/index.js +++ b/index.js @@ -160,7 +160,10 @@ async function main() { if (options['socket-client']) { socketClient = makeSocketClient() - socketClient.socket.connect(options['socket-client']) + const [ p1, p2 ] = options['socket-client'].split(':') + const host = p2 && p1 + const port = p2 ? p2 : p1 + socketClient.socket.connect(port, host) } if (socketClient) { |