Skip to content

ASP.NET Core SignalR Client for Java applications is not closing the timer on HubConnection disconnect #34489

Closed
@vbatr

Description

@vbatr

Description

ASP.NET Core SignalR Client for Java applications is not closing the timer on HubConnection disconnect that is causing memory leaks for the application using it https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/clients/java/signalr/core/src/main/java/com/microsoft/signalr/HubConnection.java#L1377

To Reproduce

Start hub connection with 3o seconds timeout (hubConnection.setServerTimeout(30 * 1000))
Disable connection with the host (turn off Internet connection). After some period of time, you will start to receive connection errors in logs. As a result, the application spawns incrementing unclosed threads and the application is crashing.

Exceptions

2021-07-13 23:22:12,932+1000 Timer-26 ERROR [c.microsoft.signalr.HubConnection] HubConnection disconnected with an error: Server timeout elapsed without receiving a message from the server..
2021-07-13 23:22:12,932+1000 Timer-30 ERROR [c.microsoft.signalr.HubConnection] HubConnection disconnected with an error: Server timeout elapsed without receiving a message from the server..
2021-07-13 23:22:12,932+1000 Timer-34 ERROR [c.microsoft.signalr.HubConnection] HubConnection disconnected with an error: Server timeout elapsed without receiving a message from the server..
2021-07-13 23:22:13,033+1000 Timer-43 ERROR [c.microsoft.signalr.HubConnection] HubConnection disconnected with an error: Server timeout elapsed without receiving a message from the server..
2021-07-13 23:22:13,033+1000 Timer-46 ERROR [c.microsoft.signalr.HubConnection] HubConnection disconnected with an error: Server timeout elapsed without receiving a message from the serve

Further technical details

  • com.microsoft.signalr v.3.0.0-preview6.19307.2
  • hub connection timeout: 30 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions