feat: improved error checking in ydi::client
This commit is contained in:
parent
075878ec17
commit
cc6d326ef5
1 changed files with 4 additions and 2 deletions
|
|
@ -137,8 +137,10 @@ NetworkData::ConnectionStatus status() {
|
|||
|
||||
namespace send {
|
||||
void reveal_clue(NetworkData::ClueID id) {
|
||||
std::scoped_lock lock{ connection->mtx };
|
||||
multipart(NetworkData::MSG_REVEAL, id).send(*connection->socket);
|
||||
if (connection) {
|
||||
std::scoped_lock lock{ connection->mtx };
|
||||
multipart(NetworkData::MSG_REVEAL, id).send(*connection->socket);
|
||||
}
|
||||
}
|
||||
} //namespace send
|
||||
} //namespace ydi::client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue