File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ export default class SocketConnection extends BaseConnection {
13
13
setupConnection ( ) : Promise < void > {
14
14
return new Promise ( resolve => {
15
15
this . client = net . createConnection ( this . sockPath ) ;
16
- this . client . on ( 'data' , this . onData ) ;
16
+ this . client . on ( 'data' , ( data ) => {
17
+ this . onData ( data ) ;
18
+ } ) ;
17
19
this . client . on ( 'connect' , ( ) => {
18
20
resolve ( ) ;
19
21
} ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export default class GothamModule {
22
22
constructor ( connection : BaseConnection , protocol : BaseProtocol ) {
23
23
this . protocol = protocol ;
24
24
this . connection = connection ;
25
- this . connection . setOnDataListener ( this . onDataHandler ) ;
25
+ // this.connection.setOnDataListener(this.onDataHandler);
26
26
}
27
27
28
28
public static default ( socketPath : string ) : GothamModule {
@@ -36,7 +36,9 @@ export default class GothamModule {
36
36
) {
37
37
// Setup Connection only when initialize called?
38
38
await this . connection . setupConnection ( ) ;
39
- this . connection . setOnDataListener ( this . onDataHandler ) ;
39
+ this . connection . setOnDataListener ( ( data ) => {
40
+ this . onDataHandler ( data ) ;
41
+ } ) ;
40
42
return this . sendRequest (
41
43
this . protocol . initialize (
42
44
moduleId ,
You can’t perform that action at this time.
0 commit comments