Skip to content

Commit

Permalink
tcp: fix URL parsing in client creation
Browse files Browse the repository at this point in the history
PR-URL: metarhia/jstp#128
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
  • Loading branch information
belochub committed May 5, 2017
1 parent 50aa5e4 commit aea4ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transport.tcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function parseUrl(urlString) {
const urlObject = url.parse(urlString);
const config = {};

if (urlObject.protocol === 'jstp') {
if (urlObject.protocol === 'jstp:') {
config.secure = false;
} else if (urlObject.protocol === 'jstps') {
} else if (urlObject.protocol === 'jstps:') {
config.secure = true;
} else {
throw new Error('Invalid URL schema');
Expand Down

0 comments on commit aea4ed4

Please sign in to comment.