Skip to content

Commit 88283ab

Browse files
added in check for trailing / on printer URL... will remove if detected.
1 parent 32047e4 commit 88283ab

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server_src/runners/state.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ class Runner {
13261326
PrinterTicker.addIssue(
13271327
new Date(),
13281328
farmPrinters[i].printerURL,
1329-
`${e.message}`,
1329+
`${e.message} retrying in ${timeout.webSocketRetry}`,
13301330
"Disconnected",
13311331
farmPrinters[i]._id
13321332
);
@@ -1520,6 +1520,12 @@ class Runner {
15201520
) {
15211521
farmPrinters[i].printerURL = `http://${farmPrinters[i].printerURL}`;
15221522
}
1523+
//Check for trailing slash and remove...
1524+
if (
1525+
farmPrinters[i].printerURL[farmPrinters[i].printerURL.length - 1] === "/"
1526+
) {
1527+
farmPrinters[i].printerURL = farmPrinters[i].printerURL.replace("/", "");
1528+
}
15231529
if (
15241530
typeof farmPrinters[i].camURL !== "undefined" &&
15251531
farmPrinters[i].camURL !== "" &&

0 commit comments

Comments
 (0)