Skip to content

Ignoring ClosedChannelException from the error stream.#105

Merged
stevegury merged 1 commit intorsocket:masterfrom
NiteshKant:filter-error-stream
Jun 26, 2016
Merged

Ignoring ClosedChannelException from the error stream.#105
stevegury merged 1 commit intorsocket:masterfrom
NiteshKant:filter-error-stream

Conversation

@NiteshKant
Copy link
Copy Markdown
Contributor

Problem

Since ReactiveSocket reads and writes from a transport connection, it is completely expected that at some point the underlying connection may have been severed. In such a case, both the read and write will fail on the connection. This pollutes logs of applications that directly log the error stream (as expected).

Modification

Since, this is kind of an "expected" exception, there is no point to send this to the error stream.
This change adds a filter to the error stream to filter any known exceptions (as of today, it is only ClosedChannelException)

PS: We currently do not unsubscribe from the input (and stop writing) when ReactiveSocket is explicitly closed. This change does not mean, we do not clean that up.

Problem

Since `ReactiveSocket` reads and writes from a transport connection, it is completely expected that at some point the underlying connection may have been severed. In such a case, both the read and write will fail on the connection. This pollutes logs of applications that directly log the error stream (as expected).

Modification

Since, this is kind of an "expected" exception, there is no point to send this to the error stream.
This change adds a filter to the error stream to filter any known exceptions (as of today, it is only `ClosedChannelException`)

PS: We currently do not unsubscribe from the input (and stop writing) when `ReactiveSocket` is explicitly closed. This change does not mean, we do not clean that up.
@stevegury
Copy link
Copy Markdown
Member

You beat me to it, I also had a fix for this!

@stevegury stevegury merged commit 45ec974 into rsocket:master Jun 26, 2016
@NiteshKant NiteshKant modified the milestone: 0.2.2 Jun 28, 2016
@NiteshKant NiteshKant deleted the filter-error-stream branch July 8, 2016 23:04
ilayaperumalg pushed a commit to ilayaperumalg/rsocket-java that referenced this pull request Dec 26, 2017
ilayaperumalg pushed a commit to ilayaperumalg/rsocket-java that referenced this pull request Dec 26, 2017
* Clarify Error Frame docs

* string handling simplified (rsocket#105)

* us-ascii

* should

* should 2
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