Comments (3)
Thank you for your answer @reqshark. Graceful reconnection attempts are a good thing but I think that an optional maximum number of reconnection attempts which, once reached, gives an error, could be interesting. This way, the UI or client can have a clue that something is not correctly working (take as an example an attempt to connect to an unknown host).
from node-nanomsg.
@jonathan-roy, the steam error event is the right way to detect stream errors associated any normal stream communication errors in node. however, when we wrote this module, we never thought to emit connection or other errs from the clib layer correctly (in the idiomatic node way that you're referencing).
I'm open to review a PR request if you would like to take stab at fixing this. You would need to make sure to call Socket's emit('error', withSomethingAboutIt)
. It's an important feature that we're lacking so I'm flagging this as a feature request instead of considering it a bug in our module (it's more of a bug).
from node-nanomsg.
what exact type of connection error are you trying to detect?
Is there a way to detect connection/communication errors?
there's no way to detect disconnect.
sometimes Node.JS TCP/HTTP or other TCP libraries will consider an unexpected client disconnect as "connection error". These connection "errors" are deliberately ignored by the library and sockets are designed to gracefully attempt reconnections without surfacing anything like err to application
from node-nanomsg.
Related Issues (20)
- add support for nng HOT 4
- TypeError: Path must be a string. Received undefined HOT 2
- rfc links
- Compile error in Node V12.* HOT 6
- vulnerable dependencies HOT 1
- deprecation warning from Nan::Callback::call HOT 2
- DeprecationWarning: Buffer HOT 2
- remove package-lock.json from .gitignore HOT 2
- fallthrough warnings in nanomsg HOT 1
- are we handling scopes correctly? HOT 1
- How do i catch timeout on reqrep?
- Carsh When msg send 10K per second HOT 2
- Electron compatibility: "Loading non-context-aware native module in renderer" HOT 1
- node 14.15 compatability HOT 1
- (node:660) electron: The default of contextIsolation is deprecated and will be c hanging from false to true in a future release of Electron. HOT 2
- Double handle scope
- -Wcast-function-type in nodejs/src/node.h
- sub: filter by binary chan prefix? HOT 1
- npm install --use_system_libnanomsg=true fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-nanomsg.