| 2426 | } |
| 2427 | |
| 2428 | static void pconnection_done(pconnection_t *pc) { |
| 2429 | { |
| 2430 | csguard g(&pc->context.cslock); |
| 2431 | pc->context.working = false; |
| 2432 | pc->hog_count = 0; |
| 2433 | if (pconnection_has_event(pc) || pconnection_work_pending(pc)) { |
| 2434 | wakeup(&pc->psocket); |
| 2435 | } else if (pn_connection_driver_finished(&pc->driver)) { |
| 2436 | pconnection_begin_close(pc); |
| 2437 | wakeup(&pc->psocket); |
| 2438 | } |
| 2439 | } |
| 2440 | } |
| 2441 | |
| 2442 | static inline bool is_inactive(pn_proactor_t *p) { |
| 2443 | return (!p->contexts && !p->disconnects_pending && !p->timeout_set && !p->need_timeout && !p->shutting_down); |
no test coverage detected