timeout on printing expanded

This commit is contained in:
2023-11-19 00:35:58 +03:00
parent 2c58bc9405
commit 69ffe8753a

View File

@@ -28,8 +28,8 @@ class PrintingService {
private async print(printer: string, type: string, bytes: Uint8Array): Promise<boolean> { private async print(printer: string, type: string, bytes: Uint8Array): Promise<boolean> {
try { try {
let response = await axios.post(`http://${this.apiUrl}:${this.port}/print/${printer}/${type}`, bytes.buffer, { let response = await axios.post(`http://${this.apiUrl}:${this.port}/print/${printer}/${type}`, bytes.buffer, {
timeout: 20 * 1000, timeout: 25 * 1000,
signal: this.newAbortSignal(20 * 1000) signal: this.newAbortSignal(25 * 1000)
}); });
return response.data.ok; return response.data.ok;
} catch (error) { } catch (error) {