mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-15 07:19:26 +02:00
bug
This commit is contained in:
parent
16328d8d03
commit
5d2fd5a97c
@ -574,12 +574,15 @@ export class StratumV1Client {
|
||||
return true;
|
||||
} else {
|
||||
console.error('Error: Cannot write to closed or ended socket.');
|
||||
return false;
|
||||
}
|
||||
} 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);
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user