mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Don't crash hard on shutdown if sharing ISOs over the network
This commit is contained in:
parent
a0688d4161
commit
92d082b74d
1 changed files with 8 additions and 7 deletions
|
@ -177,16 +177,17 @@ bool Server::RunSlice(double timeout) {
|
|||
return false;
|
||||
}
|
||||
|
||||
sockaddr client_addr;
|
||||
socklen_t client_addr_size = sizeof(client_addr);
|
||||
int conn_fd = accept(listener_, &client_addr, &client_addr_size);
|
||||
if (conn_fd >= 0) {
|
||||
sockaddr client_addr;
|
||||
socklen_t client_addr_size = sizeof(client_addr);
|
||||
int conn_fd = accept(listener_, &client_addr, &client_addr_size);
|
||||
if (conn_fd >= 0) {
|
||||
executor_->Run(std::bind(&Server::HandleConnection, this, conn_fd));
|
||||
return true;
|
||||
} else {
|
||||
FLOG("socket accept failed: %i", conn_fd);
|
||||
}
|
||||
else {
|
||||
ELOG("socket accept failed: %i", conn_fd);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Server::Run(int port) {
|
||||
|
|
Loading…
Add table
Reference in a new issue