-
Notifications
You must be signed in to change notification settings - Fork 962
Closed
Labels
bug 🪲Nope, this is wrong.Nope, this is wrong.
Description
Problem
I tried running a Reactotron 2.8.1 instance and a Reactotron 3.0.0-beta.39 instance next to each other.
Whichever order I open them in, the first one "wins", and the second one just fails silently.
So, to test this conflict, I ran this one-liner to start a new websocket server:
node -e "const http = require('http'); const WebSocket = require('ws'); const server = http.createServer((req, res) => { res.end('HTTP Server Running'); }); const wss = new WebSocket.Server({ server }); wss.on('connection', ws => { ws.on('message', message => { console.log('received: %s', message); }); console.log('WebSocket client connected'); }); server.listen(9090); console.log('HTTP and WebSocket server running on port 9090');"
Sure enough, starting Reactotron 2 or 3 up resulted in them failing silently. Instead, the websocket server would log all of the Reactotron communication attempts:
Proposed Solution
I think we should detect when the websocket server fails to start due to a port conflict and display a UI that says "Port 9090 appears to already be in use. [Retry button]".
Metadata
Metadata
Assignees
Labels
bug 🪲Nope, this is wrong.Nope, this is wrong.