Skip to content

Commit

Permalink
Fixup and update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Leblow committed May 9, 2024
1 parent 05390e6 commit 4483f71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Fix issues with recreating general channel when deleted while offline ([#2334](https://github.com/TryQuiet/quiet/issues/2334))
* Fix package.json license inconsistency
* Fixes issue with reconnecting to peers on resume on iOS ([#2424](https://github.com/TryQuiet/quiet/issues/2424))
* Reorder the closing of services, prevent sagas running multiple times and close backend server properly

[2.1.2]

Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/nest/socket/socket.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ export class SocketService extends EventEmitter implements OnModuleInit {

// Ensure the underlying connections get closed. See:
// https://github.com/socketio/socket.io/issues/1602
//
// I also tried `this.serverIoProvider.io.disconnectSockets(true)`
// which didn't work for me.
this.serverIoProvider.server.on('connection', conn => {
this.sockets.add(conn)
conn.on('close', () => {
Expand All @@ -225,8 +222,12 @@ export class SocketService extends EventEmitter implements OnModuleInit {

// Ensure the underlying connections get closed. See:
// https://github.com/socketio/socket.io/issues/1602
//
// I also tried `this.serverIoProvider.io.disconnectSockets(true)`
// which didn't work for me, but we still call it.
public closeSockets = () => {
this.logger('Disconnecting sockets')
this.serverIoProvider.io.disconnectSockets(true)
this.sockets.forEach(s => s.destroy())
}

Expand Down Expand Up @@ -269,7 +270,6 @@ export class SocketService extends EventEmitter implements OnModuleInit {
resolve()
})

this.serverIoProvider.io.disconnectSockets(true)
this.closeSockets()
})
}
Expand Down

0 comments on commit 4483f71

Please sign in to comment.