Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AsyncHttpConnection.java @ 920:3268ddf919d4
remove AsyncContinuation.isAsyncStarted()
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 09 Oct 2016 03:51:31 -0600 |
| parents | 8e9db0bbf4f9 |
| children | 23a57aad34c0 |
comparison
equal
deleted
inserted
replaced
| 919:dd6b1f079634 | 920:3268ddf919d4 |
|---|---|
| 81 // else Parse more input | 81 // else Parse more input |
| 82 else if (!_parser.isComplete() && _parser.parseAvailable()) | 82 else if (!_parser.isComplete() && _parser.parseAvailable()) |
| 83 progress=true; | 83 progress=true; |
| 84 | 84 |
| 85 // Generate more output | 85 // Generate more output |
| 86 if (_generator.isCommitted() && !_generator.isComplete() && !_endp.isOutputShutdown() && !_request.getAsyncContinuation().isAsyncStarted()) | 86 if (_generator.isCommitted() && !_generator.isComplete() && !_endp.isOutputShutdown()) |
| 87 if (_generator.flushBuffer()>0) | 87 if (_generator.flushBuffer()>0) |
| 88 progress=true; | 88 progress=true; |
| 89 | 89 |
| 90 // Flush output | 90 // Flush output |
| 91 _endp.flush(); | 91 _endp.flush(); |
| 143 // have finished generating and we reset the generator | 143 // have finished generating and we reset the generator |
| 144 _readInterested = false; | 144 _readInterested = false; |
| 145 LOG.debug("Disabled read interest while writing response {}", _endp); | 145 LOG.debug("Disabled read interest while writing response {}", _endp); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | |
| 149 if (!complete && _request.getAsyncContinuation().isAsyncStarted()) | |
| 150 { | |
| 151 // The request is suspended, so even though progress has been made, | |
| 152 // exit the while loop by setting progress to false | |
| 153 LOG.debug("suspended {}",this); | |
| 154 progress=false; | |
| 155 } | |
| 156 } | 148 } |
| 157 } | 149 } |
| 158 } | 150 } |
| 159 finally | 151 finally |
| 160 { | 152 { |
| 161 setCurrentConnection(null); | 153 setCurrentConnection(null); |
| 162 | 154 |
| 163 // If we are not suspended | 155 // return buffers |
| 164 if (!_request.getAsyncContinuation().isAsyncStarted()) | 156 _parser.returnBuffers(); |
| 165 { | 157 _generator.returnBuffers(); |
| 166 // return buffers | 158 |
| 167 _parser.returnBuffers(); | 159 // reenable idle checking unless request is suspended |
| 168 _generator.returnBuffers(); | 160 _asyncEndp.setCheckForIdle(true); |
| 169 | |
| 170 // reenable idle checking unless request is suspended | |
| 171 _asyncEndp.setCheckForIdle(true); | |
| 172 } | |
| 173 | 161 |
| 174 // Safety net to catch spinning | 162 // Safety net to catch spinning |
| 175 if (some_progress) | 163 if (some_progress) |
| 176 _total_no_progress=0; | 164 _total_no_progress=0; |
| 177 else | 165 else |
