Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SelectorManager.java @ 962:94498d6daf5b
remove SelectChannelEndPoint._interestOps
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 13 Oct 2016 22:56:15 -0600 |
parents | 3cd4c706a61f |
children | 768414c16e10 |
comparison
equal
deleted
inserted
replaced
961:790c01734386 | 962:94498d6daf5b |
---|---|
209 | 209 |
210 SelectChannelEndPoint endpoint = new SelectChannelEndPoint(channel,this,key, _maxIdleTime); | 210 SelectChannelEndPoint endpoint = new SelectChannelEndPoint(channel,this,key, _maxIdleTime); |
211 endpoint.setConnection(newConnection(channel,endpoint)); | 211 endpoint.setConnection(newConnection(channel,endpoint)); |
212 | 212 |
213 key.attach(endpoint); | 213 key.attach(endpoint); |
214 key.interestOps(SelectionKey.OP_READ); | 214 // key.interestOps(SelectionKey.OP_READ); |
215 _selector.update(); | 215 _selector.update(); |
216 //System.out.println("qqqqqqqqqqqqqqqqqqqqqqqqqqqqq b"); | 216 //System.out.println("qqqqqqqqqqqqqqqqqqqqqqqqqqqqq b"); |
217 endpoint.schedule(); | 217 endpoint.schedule(); |
218 } catch(IOException e) { | 218 } catch(IOException e) { |
219 LOG.warn("",e); | 219 LOG.warn("",e); |
237 try | 237 try |
238 { | 238 { |
239 if (!key.isValid()) | 239 if (!key.isValid()) |
240 { | 240 { |
241 key.cancel(); | 241 key.cancel(); |
242 SelectChannelEndPoint endpoint = (SelectChannelEndPoint)key.attachment(); | |
243 if (endpoint != null) | |
244 endpoint.doUpdateKey(); | |
245 continue; | 242 continue; |
246 } | 243 } |
247 | 244 |
248 if (key.isReadable()||key.isWritable()) { | 245 if (key.isReadable()||key.isWritable()) { |
249 SelectChannelEndPoint endpoint = (SelectChannelEndPoint)key.attachment(); | 246 SelectChannelEndPoint endpoint = (SelectChannelEndPoint)key.attachment(); |
250 endpoint.schedule(); | 247 endpoint.schedule(); |
251 } | 248 } |
252 } | 249 } |
253 catch (CancelledKeyException e) | 250 catch (CancelledKeyException e) |
254 { | 251 { |
255 LOG.trace("",e); | 252 // LOG.trace("",e); |
253 LOG.warn("",e); | |
256 } | 254 } |
257 catch (Exception e) | 255 catch (Exception e) |
258 { | 256 { |
259 if (isRunning()) | 257 LOG.warn("",e); |
260 LOG.warn("",e); | |
261 else | |
262 LOG.trace("",e); | |
263 } | 258 } |
264 } | 259 } |
265 | 260 |
266 // Everything always handled | 261 // Everything always handled |
267 _selector.selectedKeys().clear(); | 262 _selector.selectedKeys().clear(); |