File tree Expand file tree Collapse file tree 2 files changed +302
-266
lines changed
Expand file tree Collapse file tree 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 {
259259 this . logger . info ( `Destroy ${ this . constructor . name } ` ) ;
260260 const localError = this . conn . localError ( ) ;
261261 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 ) ) ;
264264 for ( const stream of this . streamMap . values ( ) ) {
265265 await stream . destroy ( ) ;
266266 }
@@ -333,7 +333,7 @@ class QUICConnection extends EventTarget {
333333 this . logger . debug ( `Did a recv ${ data . byteLength } ` ) ;
334334 this . conn . recv ( data , recvInfo ) ;
335335 } catch ( e ) {
336- this . logger . error ( e . toString ( ) ) ;
336+ this . logger . error ( e . message ) ;
337337 // Console.error(e);
338338 // console.log(this.conn.isClosed());
339339 // Depending on the exception, the `this.conn.recv`
@@ -478,7 +478,7 @@ class QUICConnection extends EventTarget {
478478 sendInfo . to . host ,
479479 ) ;
480480 } catch ( e ) {
481- this . logger . error ( e . toString ( ) ) ;
481+ this . logger . error ( e . message ) ;
482482 this . dispatchEvent (
483483 new events . QUICConnectionErrorEvent ( { detail : e } ) ,
484484 ) ;
You can’t perform that action at this time.
0 commit comments