Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Feb 27, 2025
1 parent bfcb473 commit 53c1fa8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/common/renderer/actions/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,14 @@ export function newSession(originalCaps, attachSessId = null) {
let sessionCaps = prefixedCaps ? getCapsObject(prefixedCaps) : {};
sessionCaps = addCustomCaps(sessionCaps);
let host, port, username, accessKey, https, path, headers;
/**
* To register a new session vendor:
* - Implement a new class inherited from VendorBase in app/common/renderer/lib/vendor/<vendor_name>.js
* - Add the newly created class to the VENDOR_MAP defined in app/common/renderer/lib/vendor/map.js
*/
const VendorClass = VENDOR_MAP[session.serverType];
if (VendorClass) {
log.info(`Using ${VendorClass.name}`);
try {
({host, port, username, accessKey, https, path, headers} = await new VendorClass(
session.server,
Expand All @@ -236,6 +242,10 @@ export function newSession(originalCaps, attachSessId = null) {
showError(e);
return false;
}
} else {
log.info(
`No vendor mapping is defined for the server type '${session.serverType}'. Using defaults`
);
}

// if the server path is '' (or any other kind of falsy) set it to default
Expand Down

0 comments on commit 53c1fa8

Please sign in to comment.