mirror of
https://github.com/Relintai/godot-mono-builds.git
synced 2024-11-12 10:25:10 +01:00
Merge pull request #48 from Calinou/fix-mono-log-spam
Fix Mono log spam
This commit is contained in:
commit
aad08390cb
48
files/patches/fix-mono-log-spam.diff
Normal file
48
files/patches/fix-mono-log-spam.diff
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/mono/metadata/threadpool-io.c b/mono/metadata/threadpool-io.c
|
||||
index fdfef2de91e28..45ac0d84b2429 100644
|
||||
--- a/mono/metadata/threadpool-io.c
|
||||
+++ b/mono/metadata/threadpool-io.c
|
||||
@@ -180,6 +180,7 @@ selector_thread_wakeup_drain_pipes (void)
|
||||
{
|
||||
gchar buffer [128];
|
||||
gint received;
|
||||
+ static gint warnings_issued = 0;
|
||||
|
||||
for (;;) {
|
||||
#if !defined(HOST_WIN32)
|
||||
@@ -192,11 +193,16 @@ selector_thread_wakeup_drain_pipes (void)
|
||||
* some unices (like AIX) send ERESTART, which doesn't
|
||||
* exist on some other OSes errno
|
||||
*/
|
||||
- if (errno != EINTR && errno != EAGAIN && errno != ERESTART)
|
||||
+ if (errno != EINTR && errno != EAGAIN && errno != ERESTART) {
|
||||
#else
|
||||
- if (errno != EINTR && errno != EAGAIN)
|
||||
+ if (errno != EINTR && errno != EAGAIN) {
|
||||
#endif
|
||||
- g_warning ("selector_thread_wakeup_drain_pipes: read () failed, error (%d) %s\n", errno, g_strerror (errno));
|
||||
+ // limit amount of spam we write
|
||||
+ if (warnings_issued < 100) {
|
||||
+ g_warning ("selector_thread_wakeup_drain_pipes: read () failed, error (%d) %s\n", errno, g_strerror (errno));
|
||||
+ warnings_issued++;
|
||||
+ }
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
#else
|
||||
@@ -204,8 +210,13 @@ selector_thread_wakeup_drain_pipes (void)
|
||||
if (received == 0)
|
||||
break;
|
||||
if (received == SOCKET_ERROR) {
|
||||
- if (WSAGetLastError () != WSAEINTR && WSAGetLastError () != WSAEWOULDBLOCK)
|
||||
- g_warning ("selector_thread_wakeup_drain_pipes: recv () failed, error (%d)\n", WSAGetLastError ());
|
||||
+ if (WSAGetLastError () != WSAEINTR && WSAGetLastError () != WSAEWOULDBLOCK) {
|
||||
+ // limit amount of spam we write
|
||||
+ if (warnings_issued < 100) {
|
||||
+ g_warning ("selector_thread_wakeup_drain_pipes: recv () failed, error (%d)\n", WSAGetLastError ());
|
||||
+ warnings_issued++;
|
||||
+ }
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
#endif
|
@ -27,6 +27,7 @@ def main(raw_args):
|
||||
|
||||
patches = [
|
||||
'fix-mono-android-tkill.diff',
|
||||
'fix-mono-log-spam.diff',
|
||||
'mono-dbg-agent-clear-tls-instead-of-abort.diff',
|
||||
'bcl-profile-platform-override.diff',
|
||||
'mono_ios_asl_log_deprecated.diff',
|
||||
|
Loading…
Reference in New Issue
Block a user