git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@614268
13f79535-47bb-0310-9956-
ffa450edef68
NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getAttachment(false);
if (attach != null) {
attach.setComet(comet);
- if (!comet) {
+ if (comet) {
+ Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout");
+ if (comettimeout != null) attach.setTimeout(comettimeout.longValue());
+ } else {
//reset the timeout
attach.setTimeout(endpoint.getSocketProperties().getSoTimeout());
}