mirror of
https://github.com/GOSTSec/poolserver
synced 2025-01-15 01:00:10 +00:00
Fix crash in client accept
This commit is contained in:
parent
41e73f3d94
commit
317e3af89b
@ -12,6 +12,7 @@ namespace Stratum
|
|||||||
{
|
{
|
||||||
bool Client::Start()
|
bool Client::Start()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
// Get IP
|
// Get IP
|
||||||
tcp::endpoint remote_ep = _socket.remote_endpoint();
|
tcp::endpoint remote_ep = _socket.remote_endpoint();
|
||||||
address remote_ad = remote_ep.address();
|
address remote_ad = remote_ep.address();
|
||||||
@ -25,6 +26,10 @@ namespace Stratum
|
|||||||
|
|
||||||
// Start reading socket
|
// Start reading socket
|
||||||
StartRead();
|
StartRead();
|
||||||
|
} catch (std::exception& e) {
|
||||||
|
sLog.Error(LOG_SERVER, "Exception caught while accepting client: %s", e.what());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user