Closed yunabe closed 5 years ago
If we run
import http from "http"; http.get('http://localhost:12345');
the kernel crashes with a message like:
throw er; // Unhandled 'error' event ^ Error: connect ECONNREFUSED 127.0.0.1:12345 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) Emitted 'error' event on ClientRequest instance at: at Socket.socketErrorListener (_http_client.js:406:9) at Socket.emit (events.js:210:5) at emitErrorNT (internal/streams/destroy.js:92:8) at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) at processTicksAndRejections (internal/process/task_queues.js:80:21) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 12345 }
Problem
If we run
the kernel crashes with a message like:
Solution