Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: ensure the server port matches the client port #232

Closed
wants to merge 1 commit into from

Conversation

SerCeMan
Copy link
Member

Unless I misunderstood the intent, the server port doesn't seem to match the client port defined below.

The port mismatch causes the example to fail with the following error.

(node:20091) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8001
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
(node:20091) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:20091) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Changing the server port to 8001 fixes the example.

@SerCeMan SerCeMan force-pushed the ensure-server-port-matches-client branch from 3ad74d8 to 7bac649 Compare June 12, 2022 06:41
@SerCeMan SerCeMan requested a review from OlegDokuka June 12, 2022 06:41
@OlegDokuka
Copy link
Member

OlegDokuka commented Jun 12, 2022

@SerCeMan
Copy link
Member Author

Ah, this makes sense, I missed it. 👍

@SerCeMan SerCeMan closed this Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants