File tree 2 files changed +302
-266
lines changed
2 files changed +302
-266
lines changed Original file line number Diff line number Diff line change @@ -259,8 +259,8 @@ class QUICConnection extends EventTarget {
259
259
this . logger . info ( `Destroy ${ this . constructor . name } ` ) ;
260
260
const localError = this . conn . localError ( ) ;
261
261
const peerError = this . conn . peerError ( ) ;
262
- if ( localError != null ) this . logger . error ( localError ) ;
263
- if ( peerError != null ) this . logger . error ( peerError ) ;
262
+ if ( localError != null ) this . logger . error ( JSON . stringify ( localError ) ) ;
263
+ if ( peerError != null ) this . logger . error ( JSON . stringify ( peerError ) ) ;
264
264
for ( const stream of this . streamMap . values ( ) ) {
265
265
await stream . destroy ( ) ;
266
266
}
@@ -333,7 +333,7 @@ class QUICConnection extends EventTarget {
333
333
this . logger . debug ( `Did a recv ${ data . byteLength } ` ) ;
334
334
this . conn . recv ( data , recvInfo ) ;
335
335
} catch ( e ) {
336
- this . logger . error ( e . toString ( ) ) ;
336
+ this . logger . error ( e . message ) ;
337
337
// Console.error(e);
338
338
// console.log(this.conn.isClosed());
339
339
// Depending on the exception, the `this.conn.recv`
@@ -478,7 +478,7 @@ class QUICConnection extends EventTarget {
478
478
sendInfo . to . host ,
479
479
) ;
480
480
} catch ( e ) {
481
- this . logger . error ( e . toString ( ) ) ;
481
+ this . logger . error ( e . message ) ;
482
482
this . dispatchEvent (
483
483
new events . QUICConnectionErrorEvent ( { detail : e } ) ,
484
484
) ;
You can’t perform that action at this time.
0 commit comments