Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/nio/BlockingChannelConnector.java @ 913:17f4fe8271de
simplify connectors
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sat, 08 Oct 2016 23:57:11 -0600 |
| parents | c60c1adfac3e |
| children | 7b94f5b33c64 |
comparison
equal
deleted
inserted
replaced
| 912:1d0c304e12b5 | 913:17f4fe8271de |
|---|---|
| 114 | 114 |
| 115 }); | 115 }); |
| 116 | 116 |
| 117 } | 117 } |
| 118 | 118 |
| 119 public void close() throws IOException | |
| 120 { | |
| 121 if (_acceptChannel != null) | |
| 122 _acceptChannel.close(); | |
| 123 _acceptChannel=null; | |
| 124 } | |
| 125 | |
| 126 @Override | 119 @Override |
| 127 public void accept() | 120 public void accept() |
| 128 throws IOException, InterruptedException | 121 throws IOException, InterruptedException |
| 129 { | 122 { |
| 130 SocketChannel channel = _acceptChannel.accept(); | 123 SocketChannel channel = _acceptChannel.accept(); |
| 249 _endpoints.add(this); | 242 _endpoints.add(this); |
| 250 | 243 |
| 251 while (isOpen()) | 244 while (isOpen()) |
| 252 { | 245 { |
| 253 _idleTimestamp=System.currentTimeMillis(); | 246 _idleTimestamp=System.currentTimeMillis(); |
| 254 if (_connection.isIdle()) | 247 if (!_connection.isIdle()) |
| 255 { | |
| 256 if (server.isLowOnThreads()) | |
| 257 { | |
| 258 int lrmit = getLowResourcesMaxIdleTime(); | |
| 259 if (lrmit>=0 && _timeout!= lrmit) | |
| 260 { | |
| 261 _timeout=lrmit; | |
| 262 } | |
| 263 } | |
| 264 } | |
| 265 else | |
| 266 { | 248 { |
| 267 if (_timeout!=getMaxIdleTime()) | 249 if (_timeout!=getMaxIdleTime()) |
| 268 { | 250 { |
| 269 _timeout=getMaxIdleTime(); | 251 _timeout=getMaxIdleTime(); |
| 270 } | 252 } |
