-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[socket.io] SubscribeMessage / handleConnection fires two events #732
Comments
Do you maybe have 2 Gateways with the same namespace configuration? (or maybe no namespace configured at all) |
Indeed, I didn't configure any namespaces. But this is the only |
I doubt it. I had the same issue but 2 gateways on the same namespace |
Sorry, I made a mistake, in my |
I'm actually encountering the same issue. import { Module } from '@nestjs/common';
import { ConnectionsModule } from './connections/connections.module';
@Module({
imports: [ConnectionsModule],
})
export class AppModule {} import { Module } from '@nestjs/common';
import { ConnectionsGateway } from './connections.gateway';
@Module({
providers: [ConnectionsGateway],
})
export class ConnectionsModule {} And ConnectionsGateway implements OnGatewayConnection, without namespace. The connection event is getting fired twice. If I provide a |
I'm actually encountering the same issue. but it is not resolved. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
WebSocketGateway methods fire twice for each events / connection
Note sure if this is expected but this could be problematic in many cases
Expected behavior
Fire only one event
Minimal reproduction of the problem with instructions
server
client : based on sample-2
Logs from the server :
What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: