mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-25 03:09:13 +01:00
Don't crash hard on shutdown if sharing ISOs over the network
This commit is contained in:
1 parent
a0688d4161
commit
92d082b74d
1 file changed
+8
-7
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user