terminalwire / community

Issue tracker & discussions for Terminalwire
0 stars 0 forks source link

Get Terminalwire working in Puma #1

Closed bradgessler closed 2 weeks ago

bradgessler commented 2 weeks ago

Terminalwire was prototyped on Falcon and thus uses the async-websockets gem for the client and the server.

Fortunately async-websockets runs on Puma (https://socketry.github.io/async-websocket/guides/rails-integration/index.html), but Terminalwire has not yet been integrated and tested with it. As a result, Terminalwire triggers a "Error reached top of thread pool: Socket timeout writing data from (Puma::Connection)"

Look into why this issue happens on Puma when STDIN#gets is called.

bradgessler commented 2 weeks ago

The problem has nothing to do with anything above! What's happening is when the application encounters and exception, it doesn't get caught by Terminalwire and properly handled, so Puma tries to send out the error resulting in this message.

I'm going to add a handler to catch the error and send it to the client so they can see the output.

bradgessler commented 2 weeks ago

Fixed in 0.1.11