@@ -104,10 +104,9 @@ export class Session {
104
104
* If the session is already running, this method throws an error.
105
105
*
106
106
* The session is started in the following steps:
107
- * @param {object } options The options for the session.
108
107
* @throws {Error } If the session is already running.
109
108
*/
110
- start ( options : { signal ?: AbortSignal } = { } ) : void {
109
+ start ( ) : void {
111
110
if ( this . #running) {
112
111
throw new Error ( "Session is already running" ) ;
113
112
}
@@ -116,16 +115,6 @@ export class Session {
116
115
const consumerController = new AbortController ( ) ;
117
116
const producerController = new AbortController ( ) ;
118
117
119
- const abort = ( reason : unknown ) => {
120
- if ( this . #running) {
121
- const { consumerController, producerController } = this . #running;
122
- consumerController . abort ( reason ) ;
123
- producerController . abort ( reason ) ;
124
- }
125
- } ;
126
- const { signal } = options ;
127
- signal ?. addEventListener ( "abort" , abort ) ;
128
-
129
118
const ignoreShutdownError = ( err : unknown ) => {
130
119
if ( err === shutdown ) {
131
120
return ;
@@ -154,7 +143,6 @@ export class Session {
154
143
155
144
const waiter = Promise . all ( [ consumer , producer ] )
156
145
. then ( ( ) => { } ) . finally ( ( ) => {
157
- signal ?. removeEventListener ( "abort" , abort ) ;
158
146
innerWriter . releaseLock ( ) ;
159
147
this . #running = undefined ;
160
148
} ) ;
0 commit comments