tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1481165 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractHttp11Processor.java InternalNioOutputBuffer.java
Date Mon, 13 May 2013 23:28:13 GMT
On 11/05/2013 15:56, Konstantin Kolinko wrote:
> 2013/5/10  <markt@apache.org>:
>> Author: markt
>> Date: Fri May 10 19:53:12 2013
>> New Revision: 1481165
>>
>> URL: http://svn.apache.org/r1481165
>> Log:
>> Only register for write when using non-blocking and there is more data to write.
This fixes various crashes in APR due to trying to add the same socket to the poller twice.
>>
>> Modified:
>>     tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>>     tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
>>
>> Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1481165&r1=1481164&r2=1481165&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
>> +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri May
10 19:53:12 2013
>> @@ -1057,8 +1057,6 @@ public abstract class AbstractHttp11Proc
>>
>>          rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
>>
>> -        registerForWrite();
>> -
>>          if (error || endpoint.isPaused()) {
>>              return SocketState.CLOSED;
>>          } else if (isAsync() || comet) {
>> @@ -1612,7 +1610,6 @@ public abstract class AbstractHttp11Proc
>>          if (error) {
>>              return SocketState.CLOSED;
>>          } else if (isAsync()) {
>> -            registerForWrite();
>>              return SocketState.LONG;
>>          } else {
>>              if (!keepAlive) {
>>
> 
> (Just noting)
> With this change the "registerForWrite()" method is used in 1 place
> only (AbstractHttp11Processor.java line 1558).
> It can be inlined there and removed from API.

Nice catch. Done.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message