Implement network scan stop handling in SocketClient disconnect process
All checks were successful
farmcontrol/farmcontrol-server/pipeline/head This commit looks good

- Added a call to `handleScanNetworkStop` in the `handleDisconnect` method of `SocketClient` to ensure proper cleanup of network scanning sessions upon disconnection.
- Improved resource management by closing all connections in the printer and document printer managers during disconnection.
This commit is contained in:
Tom Butcher 2026-09-14 22:55:41 +01:00
parent 3505121f3e
commit 5fb867bf27

View File

@ -977,6 +977,7 @@ export class SocketClient {
async handleDisconnect() { async handleDisconnect() {
logger.info("Disconnected from FarmControl Api."); logger.info("Disconnected from FarmControl Api.");
await this.handleScanNetworkStop({});
await this.printerManager.closeAllConnections(); await this.printerManager.closeAllConnections();
await this.documentPrinterManager.closeAllConnections(); await this.documentPrinterManager.closeAllConnections();
this.connected = false; this.connected = false;