Skip to content
Snippets Groups Projects
Commit 4bdae76b authored by Marin Karamihalev's avatar Marin Karamihalev
Browse files

Merge branch 'genx' of dev.iopsys.eu:iopsys/usp-js into genx

parents 7af51ee4 edbbc3b8
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ const defaultPublishEndpoint = "/usp/endpoint"; ...@@ -14,6 +14,7 @@ const defaultPublishEndpoint = "/usp/endpoint";
const defaultSubscribeEndpoint = "/usp/controller"; const defaultSubscribeEndpoint = "/usp/controller";
const defaultIdEndpoint = "obuspa/EndpointID"; const defaultIdEndpoint = "obuspa/EndpointID";
const defaultFromId = "proto::interop-usp-controller"; const defaultFromId = "proto::interop-usp-controller";
const defaultConnectionTimeout = 5000;
const idResolveTimeout = 5000; const idResolveTimeout = 5000;
const fixId = (s: string) => s.split("+").join("%2B"); const fixId = (s: string) => s.split("+").join("%2B");
... ...
......
...@@ -16,6 +16,7 @@ const isURL = (opts: ConnectionOptions): opts is URLConnectionOptions => ...@@ -16,6 +16,7 @@ const isURL = (opts: ConnectionOptions): opts is URLConnectionOptions =>
"url" in opts; "url" in opts;
const connectClient = (opts: ConnectionOptions): ConnectionClient => { const connectClient = (opts: ConnectionOptions): ConnectionClient => {
console.log({ opts })
if (isURL(opts)) if (isURL(opts))
return mqttAsync.connectAsync( return mqttAsync.connectAsync(
opts.url, opts.url,
... ...
......
...@@ -450,6 +450,7 @@ export interface OtherConnectionOptions { ...@@ -450,6 +450,7 @@ export interface OtherConnectionOptions {
cert?: CertType; cert?: CertType;
closeOnDisconnect?: boolean; closeOnDisconnect?: boolean;
reconnectsBeforeClosing?: number; reconnectsBeforeClosing?: number;
connectTimeout?: number;
} }
export type ConnectionOptions = URLConnectionOptions | HostConnectionOptions; export type ConnectionOptions = URLConnectionOptions | HostConnectionOptions;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment