James Ide
337b2df82f
http2: release request()'s "connect" event listener after it runs
...
The `Http2Session#request()` method internally listens to the "connect"
event if the session has not yet established a connection so that the
actual request can be sent after the connection has been established.
This commit removes the event listener after it runs and carries out
the request and is no longer needed. In practice this shouldn't affect
the behavior of the session object since the "connect" event fires only
once anyway, but removing the listener releases its references. The
rest of this class subscribes to the "connect" event with `once`
instead of `on` as well.
Tested by adding a new test that ensures `Http2Session#request()` is
called before the connection is established, indicated by a "connect"
listener that is run. The test also ensures all "connect" listeners are
removed after the connection is established.
PR-URL: https://github.com/nodejs/node/pull/21916
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-31 09:35:46 +02:00
..
2018-06-13 08:49:29 +02:00
2018-07-24 20:42:32 +02:00
2018-05-29 14:02:29 +02:00
2018-05-22 14:09:48 -04:00
2018-05-22 14:09:48 -04:00
2018-07-16 21:14:20 +02:00
2018-07-16 21:14:20 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-14 20:34:51 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-06-28 20:41:12 +02:00
2018-06-06 10:31:28 +02:00
2018-06-20 21:32:45 +02:00
2018-06-06 10:31:28 +02:00
2018-07-24 20:49:04 +02:00
2018-05-22 14:13:28 -04:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-05-23 17:05:38 -04:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-06-16 10:37:32 +02:00
2018-05-29 13:55:23 +02:00
2018-05-22 14:13:28 -04:00
2018-05-22 14:13:28 -04:00
2018-05-22 14:13:28 -04:00
2018-05-31 11:34:46 +02:00
2018-06-06 10:33:35 +02:00
2018-06-06 10:33:35 +02:00
2018-06-06 10:33:35 +02:00
2018-06-13 08:45:03 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-20 18:38:29 +02:00
2018-07-16 21:26:29 +02:00
2018-06-24 20:24:51 +02:00
2018-07-16 21:14:20 +02:00
2018-06-14 20:34:55 +02:00
2018-07-16 21:14:20 +02:00
2018-05-14 19:18:15 +02:00
2018-06-26 08:43:13 +02:00
2018-05-14 19:18:03 +02:00
2018-05-14 19:18:03 +02:00
2018-05-14 19:18:10 +02:00
2018-06-06 10:31:28 +02:00
2018-05-14 19:18:03 +02:00
2018-05-14 19:18:03 +02:00
2018-05-14 19:18:03 +02:00
2018-06-13 18:00:27 +02:00
2018-05-14 19:18:03 +02:00
2018-06-13 18:00:25 +02:00
2018-05-14 19:18:03 +02:00
2018-05-22 14:13:28 -04:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-05-22 14:24:32 -04:00
2018-07-24 20:42:32 +02:00
2018-06-01 11:18:18 +02:00
2018-06-13 08:45:03 +02:00
2018-05-08 18:26:16 -07:00
2018-05-08 18:26:16 -07:00
2018-05-08 18:26:16 -07:00
2018-07-14 12:03:01 +02:00
2018-05-08 18:26:16 -07:00
2018-05-08 18:26:16 -07:00
2018-06-13 08:45:04 +02:00
2018-05-22 14:13:28 -04:00
2018-05-22 14:13:28 -04:00
2018-06-13 08:45:04 +02:00
2018-06-13 08:43:39 +02:00
2018-06-13 08:41:48 +02:00
2018-05-22 14:13:28 -04:00
2018-07-18 13:00:01 +02:00
2018-07-18 13:00:01 +02:00
2018-06-13 08:41:48 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:43:39 +02:00
2018-06-28 20:41:09 +02:00
2018-06-13 08:43:39 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-05-29 13:55:58 +02:00
2018-05-31 11:34:48 +02:00
2018-07-19 09:36:06 +02:00
2018-06-13 08:45:03 +02:00
2018-07-26 09:25:54 +02:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:41:25 +02:00
2018-06-28 20:38:33 +02:00
2018-06-24 10:36:54 +02:00
2018-06-13 08:43:39 +02:00
2018-07-14 12:03:01 +02:00
2018-06-13 08:43:39 +02:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:45:03 +02:00
2018-05-22 14:24:32 -04:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-31 09:35:46 +02:00
2018-07-24 20:42:32 +02:00
2018-05-23 17:05:38 -04:00
2018-07-24 20:42:32 +02:00
2018-05-22 14:13:28 -04:00
2018-05-22 14:13:28 -04:00
2018-07-16 21:14:20 +02:00
2018-06-13 08:49:29 +02:00
2018-06-01 11:18:18 +02:00
2018-06-12 13:46:52 -05:00
2018-05-14 19:20:14 +02:00
2018-05-08 18:26:16 -07:00
2018-05-23 17:05:38 -04:00
2018-07-03 08:39:34 +02:00
2018-05-14 19:20:14 +02:00
2018-07-31 09:35:46 +02:00
2018-06-06 10:31:28 +02:00
2018-07-26 09:25:54 +02:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-06-24 20:24:51 +02:00
2018-05-23 17:05:38 -04:00
2018-05-23 17:05:38 -04:00
2018-07-06 11:33:15 +02:00
2018-07-24 20:42:32 +02:00
2018-05-23 17:05:38 -04:00
2018-07-24 20:42:32 +02:00
2018-07-14 12:03:01 +02:00
2018-07-14 12:03:01 +02:00
2018-05-24 13:25:03 -04:00
2018-05-14 19:20:31 +02:00
2018-05-25 13:59:34 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-17 14:08:55 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:41:48 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-07-31 09:35:46 +02:00
2018-06-13 08:49:29 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:45:03 +02:00
2018-05-14 19:22:23 +02:00
2018-07-16 21:26:29 +02:00
2018-05-25 22:43:27 +02:00
2018-05-25 14:01:21 +02:00
2018-07-24 20:42:32 +02:00
2018-06-25 20:04:41 +02:00
2018-06-19 08:59:44 +02:00
2018-05-14 19:20:21 +02:00
2018-06-01 11:18:19 +02:00
2018-06-06 10:31:28 +02:00
2018-07-26 20:11:18 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-14 12:36:53 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-14 14:17:10 +02:00
2018-06-22 14:54:25 +02:00
2018-07-12 09:09:01 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-05-25 14:00:41 +02:00
2018-05-23 17:05:38 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-07-24 20:42:32 +02:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-06-13 08:45:03 +02:00
2018-05-22 14:24:32 -04:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-14 12:03:01 +02:00
2018-07-24 20:42:32 +02:00
2018-06-13 08:41:48 +02:00
2018-05-22 14:24:32 -04:00
2018-07-24 20:42:32 +02:00
2018-05-22 14:24:32 -04:00
2018-06-06 10:31:28 +02:00
2018-05-25 22:44:28 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-14 12:03:01 +02:00
2018-07-14 12:03:01 +02:00
2018-05-12 17:51:10 +02:00
2018-06-14 20:34:54 +02:00
2018-06-24 10:36:56 +02:00
2018-07-24 20:42:32 +02:00
2018-05-25 22:44:20 +02:00
2018-06-13 08:49:29 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-05-29 14:02:29 +02:00
2018-05-22 14:13:28 -04:00
2018-07-19 09:34:51 +02:00
2018-06-24 16:01:46 +02:00
2018-06-06 10:31:28 +02:00
2018-06-20 21:32:47 +02:00
2018-06-06 10:32:48 +02:00
2018-06-13 08:41:48 +02:00
2018-05-22 14:24:32 -04:00
2018-07-04 20:43:45 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-07-24 20:42:32 +02:00
2018-05-12 17:51:18 +02:00
2018-06-13 08:49:29 +02:00
2018-07-16 21:26:29 +02:00
2018-06-13 08:49:29 +02:00
2018-07-04 20:43:46 +02:00
2018-07-10 09:04:19 +02:00
2018-05-22 14:09:48 -04:00
2018-05-23 17:05:38 -04:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-06-13 08:49:29 +02:00
2018-06-12 05:16:55 -05:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-28 20:41:09 +02:00
2018-07-19 09:35:56 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-13 08:45:03 +02:00
2018-06-20 21:38:01 +02:00
2018-06-13 08:49:29 +02:00
2018-05-23 17:05:38 -04:00
2018-06-13 08:49:29 +02:00
2018-07-24 20:42:32 +02:00
2018-07-16 21:14:20 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-06-06 10:32:48 +02:00
2018-06-14 20:34:52 +02:00
2018-06-01 16:45:16 +02:00
2018-06-28 20:41:05 +02:00
2018-07-06 11:33:15 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-05-22 14:24:32 -04:00
2018-07-14 12:03:01 +02:00
2018-07-24 20:42:32 +02:00
2018-05-22 15:24:53 -04:00
2018-05-23 17:05:38 -04:00
2018-06-13 08:45:04 +02:00
2018-06-13 08:45:04 +02:00
2018-06-13 08:45:04 +02:00
2018-07-14 12:36:53 +02:00
2018-06-13 08:45:04 +02:00
2018-07-03 08:39:34 +02:00
2018-07-03 08:39:34 +02:00
2018-07-03 08:39:34 +02:00
2018-07-03 08:39:34 +02:00
2018-07-26 09:25:54 +02:00
2018-07-04 20:43:45 +02:00
2018-07-04 20:43:45 +02:00
2018-07-03 08:39:34 +02:00
2018-06-13 08:45:04 +02:00
2018-07-14 12:03:01 +02:00
2018-06-28 20:41:08 +02:00
2018-06-28 20:41:08 +02:00
2018-06-13 08:45:04 +02:00
2018-06-13 08:45:04 +02:00
2018-06-13 08:45:04 +02:00
2018-07-04 20:43:45 +02:00
2018-07-14 12:36:53 +02:00
2018-07-14 12:36:53 +02:00
2018-06-28 20:41:08 +02:00
2018-06-13 08:45:04 +02:00
2018-06-13 09:54:55 +02:00
2018-06-13 08:45:04 +02:00
2018-07-24 20:42:32 +02:00
2018-07-24 20:42:32 +02:00
2018-07-04 20:43:43 +02:00