@@ -20,13 +20,14 @@ class AwsSigV4DriverRemoteConnection extends gremlin.driver.RemoteConnection {
20
20
this . try = 0 ;
21
21
this . maxRetry = this . options . maxRetry || 10 ;
22
22
23
- this . clientOptions = Object . assign ( {
23
+ this . clientOptions = {
24
24
connectOnStartup : true ,
25
25
mimeType : 'application/vnd.gremlin-v2.0+json' ,
26
26
pingEnabled : true ,
27
27
pingInterval : 1000 ,
28
28
pongTimeout : 2000 ,
29
- } , this . options ) ;
29
+ ...this . options ,
30
+ } ;
30
31
31
32
this . _rejections = { } ;
32
33
this . _connect ( ) ;
@@ -65,10 +66,10 @@ class AwsSigV4DriverRemoteConnection extends gremlin.driver.RemoteConnection {
65
66
_connectSocket ( ) {
66
67
const { url, headers } = getUrlAndHeaders ( this . host , this . port , this . options , '/gremlin' , this . secure ? 'wss' : 'ws' ) ;
67
68
debug ( `connect: ${ JSON . stringify ( url , headers ) } (try #${ this . try } )` ) ;
68
- this . _client = new gremlin . driver . Client ( url , Object . assign ( { headers } , this . clientOptions ) ) ;
69
- this . _client . _connection . on ( 'log' , log => this . _logHandler ( log ) ) ;
69
+ this . _client = new gremlin . driver . Client ( url , ( { headers, ... this . clientOptions } ) ) ;
70
+ this . _client . _connection . on ( 'log' , ( log ) => this . _logHandler ( log ) ) ;
70
71
this . _client . _connection . on ( 'close' , ( code , message ) => this . _closeHandler ( code , message ) ) ;
71
- this . _client . _connection . on ( 'error' , error => this . _errorHandler ( error ) ) ;
72
+ this . _client . _connection . on ( 'error' , ( error ) => this . _errorHandler ( error ) ) ;
72
73
this . _client . _connection . _ws . on ( 'open' , ( ) => this . _connectHandler ( ) ) ;
73
74
}
74
75
@@ -111,7 +112,7 @@ class AwsSigV4DriverRemoteConnection extends gremlin.driver.RemoteConnection {
111
112
}
112
113
113
114
_cancelPendingQueries ( error ) {
114
- Object . values ( this . _rejections ) . forEach ( reject => reject ( error ) ) ;
115
+ Object . values ( this . _rejections ) . forEach ( ( reject ) => reject ( error ) ) ;
115
116
this . _rejections = { } ;
116
117
}
117
118
@@ -134,7 +135,7 @@ class AwsSigV4DriverRemoteConnection extends gremlin.driver.RemoteConnection {
134
135
} )
135
136
. catch ( reject ) ;
136
137
} )
137
- . then ( result => result ) ;
138
+ . then ( ( result ) => result ) ;
138
139
}
139
140
140
141
/** @override */
0 commit comments