| 1210 | } |
| 1211 | |
| 1212 | void THttpRequest::OnConnect(THttpConn* c) { |
| 1213 | THttpConnRef extraConn; |
| 1214 | { |
| 1215 | TGuard<TSpinLock> g(SL_); |
| 1216 | if (Y_UNLIKELY(!!Conn2_)) { |
| 1217 | //has pair concurrent conn, 'should stay only one' |
| 1218 | if (Conn2_.Get() == c) { |
| 1219 | #ifdef DEBUG_STAT |
| 1220 | ++TDebugStat::Conn2Success; |
| 1221 | #endif |
| 1222 | Conn2_.Swap(Conn_); |
| 1223 | } |
| 1224 | extraConn.Swap(Conn2_); |
| 1225 | } |
| 1226 | } |
| 1227 | if (!!extraConn) { |
| 1228 | extraConn->DetachRequest(); //prevent call OnError() |
| 1229 | extraConn->Close(); |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | void THttpRequest::OnResponse(TAutoPtr<THttpParser>& rsp) { |
| 1234 | DBGOUT("THttpRequest::OnResponse()"); |
no test coverage detected