socketio / socket.io-postgres-adapter

The Socket.IO Postgres adapter, allowing to broadcast events between several Socket.IO servers
https://socket.io
MIT License
24 stars 8 forks source link

fix: do not emit "error" events #7

Closed darrachequesne closed 2 years ago

darrachequesne commented 2 years ago

Forcing users to handle "error" events is useless since there is no interesting way to handle them (no retry, for example).

Before:

io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
});

io.of("/").adapter.on("error", () => {
  // needed so that no exception is thrown
});

After:

io.adapter(createAdapter(pool));

poll.on("error", (err) => {
  // client disconnection
})
darrachequesne commented 2 years ago

Superseded by https://github.com/socketio/socket.io-postgres-adapter/commit/ec1b78cf132147960f05402f6ae9b75ec77e1dd6.