Skip to content

Fix for rmt_GetLastErrorMessage do not report message for startup fail#265

Open
ntfshard wants to merge 1 commit intoCeltoys:mainfrom
ntfshard:fix_for_errormsg
Open

Fix for rmt_GetLastErrorMessage do not report message for startup fail#265
ntfshard wants to merge 1 commit intoCeltoys:mainfrom
ntfshard:fix_for_errormsg

Conversation

@ntfshard
Copy link
Copy Markdown

@ntfshard ntfshard commented Jul 9, 2025

Hello

This patch should resolve problem when initialization fails and error is not informative: No error message
Main problem: if init fails, 'destructor' will call automatically (by macro) and TLS, which store msg will be destroyed.

Maybe better solution to move TLS destruction to _rmt_DestroyGlobalInstance but I have concern which tread will call it. Maybe same, maybe different. In other words it still can be a leak in case of different treads for init/fint

Minor fix for closing socket if bind fails
Also fixed some style and grammar problems

You can verify this fix by running 2 instances of example

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.

1 participant