websocketpp icon indicating copy to clipboard operation
websocketpp copied to clipboard

Fix two crashes when using websocketpp as a client library

Open Radrik5 opened this issue 3 years ago • 0 comments

The first part continues fix from PR #539: references to alog and elog were fixed (replaced with shared_ptr) but reference to rng was not. If rng is accessed after endpoint is destroyed, application crashes.

The second part fixes crash in endpoint::handle_connect() called when endpoint is already destroyed. The fix is to capture shared_ptr instead of raw this pointer (similar to callbacks in connection).

The crashes occurred regularly in automated tests for application that creates and destroys endpoint for each client connection.

Radrik5 avatar May 24 '22 16:05 Radrik5