Commit aec321a
fix: thread-safe logging to prevent IOException on concurrent writes
Log() opened the file with FileShare.Read, so concurrent calls from
different threads (TCP handler, UI, retry timer) would throw IOException.
Added a lock to serialize writes and changed to FileShare.ReadWrite.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1272fca commit aec321a
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
| 1076 | + | |
| 1077 | + | |
1076 | 1078 | | |
1077 | 1079 | | |
1078 | 1080 | | |
1079 | | - | |
| 1081 | + | |
1080 | 1082 | | |
1081 | | - | |
1082 | | - | |
| 1083 | + | |
1083 | 1084 | | |
| 1085 | + | |
| 1086 | + | |
1084 | 1087 | | |
1085 | 1088 | | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
1090 | 1093 | | |
1091 | 1094 | | |
1092 | 1095 | | |
| |||
0 commit comments