dotnet / dotnet/aspnetcore

Signalr Core TypeScript timing of connection on start with abort

Open
#62,622 4 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

The way I have my logic set up is when a player connects to the server, I check for a valid game and if it doesn't exist I abort the connection.

This works except when it doesn't, ~5:1. I went ahead and enabled LogLevel.Debug and I console.logged the error for the .start() method in a way.

I'm adding the logs for when it works and when it doesn't.

Image

Image

### Expected Behavior

I expect the connection to connect fully and then have it be closed every time.

### Steps To Reproduce

_No response_

### Exceptions (if any)

S: The connection was stopped before the hub handshake could complete.
at r._stopInternal (https://bargames.dev.doni.vpn/app/chunk-KBQHQZ4L.js:1:13911)
at r._processIncomingData (https://bargames.dev.doni.vpn/app/chunk-KBQHQZ4L.js:1:16855)
at connection.onreceive (https://bargames.dev.doni.vpn/app/chunk-KBQHQZ4L.js:1:9830)
at c.onmessage (https://bargames.dev.doni.vpn/app/chunk-KBQHQZ4L.js:1:38070)
at WebSocket.Ye (https://bargames.dev.doni.vpn/app/polyfills-FFHMD2TL.js:1:11697)
at f.invokeTask (https://bargames.dev.doni.vpn/app/polyfills-FFHMD2TL.js:1:7068)
at Object.onInvokeTask (https://bargames.dev.doni.vpn/app/chunk-A7VQLA2F.js:7:23920)
at f.invokeTask (https://bargames.dev.doni.vpn/app/polyfills-FFHMD2TL.js:1:6989)
at t.runTask (https://bargames.dev.doni.vpn/app/polyfills-FFHMD2TL.js:1:2375)
at E.invokeTask [as invoke] (https://bargames.dev.doni.vpn/app/polyfills-FFHMD2TL.js:1:8144)

### .NET Version

9.0.300

### Anything else?

I didn't experience it on my local machine but I first saw it in prod and now I can observe it in staging.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.