mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 13:06:24 +02:00
Merge pull request #13850 from unknownbrackets/warnings
Cleanup some warnings and a logger shutdown crash
This commit is contained in:
20 files changed
+68
-804
No files matched your search
@@ -176,7 +176,7 @@ void InputSink::Fill() {
|
||||
// Whatever isn't valid and follows write_ is what's available.
|
||||
size_t avail = BUFFER_SIZE - std::max(write_, valid_);
|
||||
|
||||
int bytes = recv(fd_, buf_ + write_, (int)avail, 0);
|
||||
int bytes = recv(fd_, buf_ + write_, (int)avail, MSG_NOSIGNAL);
|
||||
AccountFill(bytes);
|
||||
}
|
||||
}
|
||||
@@ -399,6 +399,14 @@ void OutputSink::AccountPush(size_t bytes) {
|
||||
|
||||
void OutputSink::AccountDrain(int bytes) {
|
||||
if (bytes < 0) {
|
||||
#if PPSSPP_PLATFORM(WINDOWS)
|
||||
int err = WSAGetLastError();
|
||||
if (err == WSAEWOULDBLOCK)
|
||||
return;
|
||||
#else
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN)
|
||||
return;
|
||||
#endif
|
||||
ERROR_LOG(IO, "Error writing to socket");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user