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

Already on GitHub? Sign in to your account

Fixed a cyclical error when flushing an error and flushing fails. #126

Merged
merged 1 commit into from Jul 10, 2014

Conversation

Projects
None yet
3 participants
Contributor

hmottestad commented Dec 8, 2013

Added a try catch around flushResponse() in error(Throwable error) which can cause cyclical errors where one error causes another because it fails when flushing.

Following is the stack trace for the expection:

org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more

@hmottestad hmottestad Update NettyHttpResponse.java
Added a try catch around flushResponse() in error(Throwable error) which can cause cyclical errors where one error causes another because it fails when flushing. 

Following is the stack trace for the expection:

org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
	at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
	at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
	at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
	at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
	at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
	... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
	at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
	at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
	at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
	at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
	at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
	... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
	at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
	at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
	at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
	at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
	at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
	... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
	at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
	at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
	at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
	at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
	at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
	... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
	at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
	at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
	at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
	at org.jboss.netty.channel.Channels.write(Channels.java:704)
	at org.jboss.netty.channel.Channels.write(Channels.java:671)
	at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
	at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
	at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
	at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
	... 9 more
12438c0
Contributor

hmottestad commented Jan 12, 2014

Bump.

@lostdj lostdj added a commit to lostdj/webbit that referenced this pull request Feb 18, 2014

@lostdj lostdj Merge branch 'hmottestad-webbit/master'
Webbit: Sync with upstream: Pull request "Fixed a cyclical error when flushing an error and flushing fails. #126".

Pull request details:

Added a try catch around flushResponse() in error(Throwable error) which can cause cyclical errors where one error causes another because it fails when flushing.

Following is the stack trace for the expection:

org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
org.webbitserver.WebbitException: cannot send more responses than requests on [id: 0x4be70e4d, /10.0.0.1:57648 :> /10.0.0.99:1234]
at org.webbitserver.WebbitException.fromException(WebbitException.java:36)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:170)
at org.webbitserver.netty.NettyHttpChannelHandler$3.run(NettyHttpChannelHandler.java:94)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.IllegalStateException: cannot send more responses than requests
at org.jboss.netty.handler.codec.http.HttpContentEncoder.writeRequested(HttpContentEncoder.java:100)
at org.jboss.netty.channel.Channels.write(Channels.java:704)
at org.jboss.netty.channel.Channels.write(Channels.java:671)
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
at org.webbitserver.netty.NettyHttpResponse.write(NettyHttpResponse.java:207)
at org.webbitserver.netty.NettyHttpResponse.flushResponse(NettyHttpResponse.java:195)
at org.webbitserver.netty.NettyHttpResponse.error(NettyHttpResponse.java:168)
... 9 more
d1f6c55

@sharvie sharvie added a commit that referenced this pull request Jul 10, 2014

@sharvie sharvie Merge pull request #126 from hmottestad/master
Fixed a cyclical error when flushing an error and flushing fails.
b7c45f3

@sharvie sharvie merged commit b7c45f3 into webbit:master Jul 10, 2014

1 check passed

default The Travis CI build passed
Details
Owner

aslakhellesoy commented Jul 10, 2014

@sharvie I see you're in :-)

Contributor

sharvie commented Jul 11, 2014

I actually don't think this patch fixes the issue. Working on another solution now

Contributor

sharvie commented Jul 17, 2014

I ended up reverting this pull request because it didn't solve the issue. I just committed a change that fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment