uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.76k stars 563 forks source link

terminate called without an active exception #918

Closed e3dio closed 7 months ago

e3dio commented 1 year ago

If you get an error like Error: Returning from a request handler without responding or attaching an abort handler is forbidden! that is fine can fix it, but it also prints terminate called without an active exception then cpu goes to 100% for process systemd-coredum and the node process won't exit with ctr+c for like 10 seconds then Aborted (core dumped), it should just immediately exit the program

uNetworkingAB commented 1 year ago

That message should probably be cleaned up. Maybe std::terminate() is not as direct as std::abort(). But you don't want std::exit() because it is supposed to be a critical error.

uNetworkingAB commented 7 months ago

I think this not not a bug but just your coredump taking a long time? We call std::terminate on invalid use, and this calls std::abort which causes a coredump on some systems. I think this is fine, because calling std::exit would be just a normal program termination. IMO there is nothing to fix here, so closing for now.