Skip to content

Commit

Permalink
add optional callback to ioSocket.connect method (rodgc#160)
Browse files Browse the repository at this point in the history
* feat: add optional callback to ioSocket.connect method

* refactor: connect function to use optional parameter

Co-authored-by: Robin De Schepper <[email protected]>

---------

Co-authored-by: Robin De Schepper <[email protected]>
  • Loading branch information
akkaraju-satvik and Helveg authored Sep 6, 2023
1 parent 56a0d58 commit bc06522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socket-io.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export class WrappedSocket {
this.ioSocket.once(eventName, callback);
}

connect() {
return this.ioSocket.connect();
connect(callback?: (err: any) => void) {
return this.ioSocket.connect(callback);
}

disconnect(_close?: any) {
Expand Down

0 comments on commit bc06522

Please sign in to comment.