Mohammad Nejati

Results 144 comments of Mohammad Nejati

> @ashtum My CPU usage just became 100%, that's how I've noticed it. It's single core cheap VPS but still. Currently using -Ofast, will try to compile also without debug...

Are you using a multi-threaded executor? I'm afraid you might have unintentionally created an infinite loop somewhere in your code, probably by not checking the error code of an operation...

I'm mesuring approximately 300K requests per second using the [http_server_async](https://github.com/boostorg/beast/blob/develop/example/http/server/async/http_server_async.cpp) example and utilizing 4 threads (as stated in the provided link). However, if you create one io_context per core and...

> You should show the smallest possible example code which uses the parser to extract two complete messages which are already stuffed into its input buffer I've added the example...

The behavior has changed in a way that requires the user to call `parser::parse` and check for `error::need_input` before calling `parser::prepare` and performing a read.

> 1. Whats is websocket state In case of error in async_handshake? Can i reuse it (call async_resolve and async_connect right after it callbacks with error) ? Or should i...

Have you set a timeout on the stream? https://www.boost.org/doc/libs/1_85_0/libs/beast/doc/html/beast/using_websocket/timeouts.html

`beast::get_lowest_layer(*ws_stream_).close();` will do it, or you can simply ignore the stream object and let it be destroyed.

Yes, that would have the same effect as closing the underlying socket.

Thank you for the report and the reproducible example. I can confirm the issue and it is already fixed in #2926 and will be included in the next Boost release.