Skip to content

Commit d619e8a

Browse files
author
Matt Branton
committed
Websocket start_link now accepts binary string as URL option
1 parent 48c1186 commit d619e8a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/websocket_client.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ start_link(URL, Handler, HandlerArgs) ->
2525

2626
start_link(URL, Handler, HandlerArgs, AsyncStart) when is_boolean(AsyncStart) ->
2727
start_link(URL, Handler, HandlerArgs, [{async_start, AsyncStart}]);
28+
start_link(URL, Handler, HandlerArgs, Opts) when is_binary(URL) ->
29+
start_link(erlang:binary_to_list(URL), Handler, HandlerArgs, Opts);
2830
start_link(URL, Handler, HandlerArgs, Opts) when is_list(Opts) ->
2931
case http_uri:parse(URL, [{scheme_defaults, [{ws,80},{wss,443}]}]) of
3032
{ok, {Protocol, _, Host, Port, Path, Query}} ->

0 commit comments

Comments
 (0)