File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -160,19 +160,26 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
160
160
}
161
161
_pluginEvents . AfterRequestLog += AfterRequestLogAsync ;
162
162
163
- while ( ! stoppingToken . IsCancellationRequested && _proxyServer . ProxyRunning )
163
+
164
+ try
164
165
{
165
- while ( ! Console . KeyAvailable )
166
+ while ( ! stoppingToken . IsCancellationRequested && _proxyServer . ProxyRunning )
166
167
{
167
- await Task . Delay ( 10 , stoppingToken ) ;
168
- }
169
- // we need this check or proxy will fail with an exception
170
- // when run for example in VSCode's integrated terminal
171
- if ( isInteractive )
172
- {
173
- await ReadKeysAsync ( ) ;
168
+ while ( ! Console . KeyAvailable )
169
+ {
170
+ await Task . Delay ( 10 , stoppingToken ) ;
171
+ }
172
+ // we need this check or proxy will fail with an exception
173
+ // when run for example in VSCode's integrated terminal
174
+ if ( isInteractive )
175
+ {
176
+ await ReadKeysAsync ( ) ;
177
+ }
174
178
}
175
179
}
180
+ catch ( TaskCanceledException )
181
+ {
182
+ }
176
183
}
177
184
178
185
private void FirstRunSetup ( )
You can’t perform that action at this time.
0 commit comments