This is an implementation of ServerRenderingPool
for react-on-rails that connects
to NodeJS process over a TCP socket, instead of a UNIX socket.
The code handles socket disconnections, and attempts to reestablish connection to NodeJS server process in these cases. Also, if a connection-related exception was caught, it will not raise an exception in Rails server, but report it to Airbrake and return empty result - to let standard front-end code deal run its course.
The should be placed into an initializer (e.g. config/initializers/react_on_rails.rb
), and its configuration block expanded with
your usual configuration.