Skip to content

DEV-1449#38

Open
Radrick19 wants to merge 19 commits into
mainfrom
feature/DEV-1449
Open

DEV-1449#38
Radrick19 wants to merge 19 commits into
mainfrom
feature/DEV-1449

Conversation

@Radrick19

@Radrick19 Radrick19 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Release 06.07.2026 | Add logging + fix packet reading

New
Added more logging across the adapter

Bugfixes
LDAP packets are now read more correctly, including packets split across
several TCP segments

@Radrick19 Radrick19 changed the title Add logging for unexpected behaviour DEV-1449 Jul 3, 2026
Comment thread src/Services/LdapService.cs Outdated
Comment thread src/Server/LdapProxy.cs
} while (ldapPacket.Data.Length > 0);
}
catch (IOException)
catch (IOException) when (_closing)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему здесь when (_closing) используется только для IOException? Может стоит сделать для всех Exception?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот кэч ловит единственный кейс, который логировать не нужно: когда клиент или сервер рвут соединение, а вторая сторона всё ещё пытается из него читать — тогда прилетает ожидаемый io exception. А если упадёт где-то ещё, это как раз хочется видеть в логах

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Есть вероятность что при _closing = true придет не IOException, а например какой-нибудь ObjectDisposedException и тогда мы попадем в обычный catch (Exception).
Предлагаю пока оставить как есть

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants