Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SslConnection.java @ 1071:b4ba8a4d5a16
remove JBuffer.space()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 10 Nov 2016 02:13:28 -0700 |
parents | 9d357b9e4bcb |
children | 00704b28b9f1 |
comparison
equal
deleted
inserted
replaced
1070:a44fc6b53757 | 1071:b4ba8a4d5a16 |
---|---|
144 if (_buffers!=null && | 144 if (_buffers!=null && |
145 _inbound.remaining()==0 && | 145 _inbound.remaining()==0 && |
146 _outbound.remaining()==0 && | 146 _outbound.remaining()==0 && |
147 _unwrapBuf.remaining()==0) | 147 _unwrapBuf.remaining()==0) |
148 { | 148 { |
149 _inbound=null; | 149 _inbound = null; |
150 _outbound = null; | 150 _outbound = null; |
151 _unwrapBuf=null; | 151 _unwrapBuf=null; |
152 __buffers.set(_buffers); | 152 __buffers.set(_buffers); |
153 _buffers=null; | 153 _buffers=null; |
154 } | 154 } |
267 // Do any real IO | 267 // Do any real IO |
268 int filled=0,flushed=0; | 268 int filled=0,flushed=0; |
269 try | 269 try |
270 { | 270 { |
271 // Read any available data | 271 // Read any available data |
272 if (_inbound.space()>0 && (filled=_endp.fill(_inbound))>0) | 272 if (_inbound.capacity()>_inbound.limit() && (filled=_endp.fill(_inbound))>0) |
273 progress = true; | 273 progress = true; |
274 | 274 |
275 // flush any output data | 275 // flush any output data |
276 if (_outbound.hasRemaining() && (flushed=_endp.flush(_outbound))>0) | 276 if (_outbound.hasRemaining() && (flushed=_endp.flush(_outbound))>0) |
277 progress = true; | 277 progress = true; |
293 throw new IllegalStateException(); | 293 throw new IllegalStateException(); |
294 | 294 |
295 case NOT_HANDSHAKING: | 295 case NOT_HANDSHAKING: |
296 { | 296 { |
297 // Try unwrapping some application data | 297 // Try unwrapping some application data |
298 if (toFill.space()>0 && _inbound.hasRemaining() && unwrap(toFill)) | 298 if (toFill.capacity()>toFill.limit() && _inbound.hasRemaining() && unwrap(toFill)) |
299 progress=true; | 299 progress=true; |
300 | 300 |
301 // Try wrapping some application data | 301 // Try wrapping some application data |
302 if (toFlush.hasRemaining() && _outbound.space()>0 && wrap(toFlush)) | 302 if (toFlush.hasRemaining() && _outbound.capacity()>_outbound.limit() && wrap(toFlush)) |
303 progress=true; | 303 progress=true; |
304 } | 304 } |
305 break; | 305 break; |
306 | 306 |
307 case NEED_TASK: | 307 case NEED_TASK: |