(socket)
| 681 | } |
| 682 | |
| 683 | function asyncResetHandle(socket) { |
| 684 | // Guard against an uninitialized or user supplied Socket. |
| 685 | const handle = socket._handle; |
| 686 | if (handle && typeof handle.asyncReset === 'function') { |
| 687 | // Assign the handle a new asyncId and run any destroy()/init() hooks. |
| 688 | handle.asyncReset(new ReusedHandle(handle.getProviderType(), handle)); |
| 689 | socket[async_id_symbol] = handle.getAsyncId(); |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | module.exports = { |
| 694 | Agent, |
no test coverage detected
searching dependent graphs…