394370 392237 reverted Improved handling of SPDY async send. Added simple NPE protection to further investigate problem

This commit is contained in:
Greg Wilkins 2012-11-16 10:55:10 +11:00
parent b5c6555a4a
commit 62e033fcd0
1 changed files with 6 additions and 10 deletions

View File

@ -117,20 +117,16 @@ public class HttpTransportOverSPDY implements HttpTransport
reply(stream, new ReplyInfo(headers, close));
}
if (stream.isClosed())
{
callback.failed(context,new EofException());
}
else if (hasContent)
if ((hasContent || lastContent ) && !stream.isClosed() )
{
if (content==null)
content=BufferUtil.EMPTY_BUFFER;
stream.data(new ByteBufferDataInfo(content, lastContent),endPoint.getIdleTimeout(),TimeUnit.MILLISECONDS,context,callback);
}
else if (lastContent)
{
stream.data(new ByteBufferDataInfo(BufferUtil.EMPTY_BUFFER, lastContent),endPoint.getIdleTimeout(),TimeUnit.MILLISECONDS,context,callback);
}
else
callback.completed(context);
}
@Override