mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
bug
This commit is contained in:
@@ -574,12 +574,15 @@ export class StratumV1Client {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
console.error('Error: Cannot write to closed or ended socket.');
|
console.error('Error: Cannot write to closed or ended socket.');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await this.socket.end();
|
if (!this.socket.destroyed && !this.socket.writableEnded) {
|
||||||
|
await this.socket.end();
|
||||||
|
}
|
||||||
console.error('Error occurred while writing to socket:', error);
|
console.error('Error occurred while writing to socket:', error);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user