| 598 | } |
| 599 | |
| 600 | Status ReactorThread::StartConnectionNegotiation(const scoped_refptr<Connection>& conn) { |
| 601 | DCHECK(IsCurrentThread()); |
| 602 | |
| 603 | // Set a limit on how long the server will negotiate with a new client. |
| 604 | MonoTime deadline = MonoTime::Now() + |
| 605 | MonoDelta::FromMilliseconds(reactor()->messenger()->rpc_negotiation_timeout_ms()); |
| 606 | |
| 607 | scoped_refptr<Trace> trace(new Trace()); |
| 608 | ADOPT_TRACE(trace.get()); |
| 609 | TRACE("Submitting negotiation task for $0", conn->ToString()); |
| 610 | auto authentication = reactor()->messenger()->authentication(); |
| 611 | auto encryption = reactor()->messenger()->encryption(); |
| 612 | auto loopback_encryption = reactor()->messenger()->loopback_encryption(); |
| 613 | ThreadPool* negotiation_pool = |
| 614 | reactor()->messenger()->negotiation_pool(conn->direction()); |
| 615 | RETURN_NOT_OK(negotiation_pool->Submit([conn, authentication, encryption, loopback_encryption, |
| 616 | deadline]() { |
| 617 | Negotiation::RunNegotiation(conn, authentication, encryption, loopback_encryption, |
| 618 | deadline); |
| 619 | })); |
| 620 | return Status::OK(); |
| 621 | } |
| 622 | |
| 623 | void ReactorThread::CompleteConnectionNegotiation( |
| 624 | const scoped_refptr<Connection>& conn, |
nothing calls this directly
no test coverage detected