-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Bug Description:
Hi,
It could be difficult to explain the issue I am facing on the latest Theia (1.43.1), but I will try:
I have a class that extends the WebSocketConnectionProvider:
export class CustomWebSocketConnectionProvider extends WebSocketConnectionProvider {
protected override createWebSocket(url: string): Socket {
...
}
}
And here is the binding code:
bind(CustomWebSocketConnectionProvider).toSelf().inSingletonScope();
rebind(WebSocketConnectionProvider).toService(CustomWebSocketConnectionProvider);
It was working correctly until I upgraded to 1.43.1 (from 1.40). I see now in the dev-tools on the network tab that there are two web sockets, and only one is actually working (before that there was only one).
If I debug the code from dev-tools and put a breakpoint inside the createWebSocket method in both classes (CustomWebSocketConnectionProvider and the base WebSocketConnectionProvider class), and reload the page, the break point breaks in both of them! this should not be the case, since I override this class and rebind it to the new one.
I think this issue is caused by the Remote SSH PR from 1.43: #12618
Steps to Reproduce:
- create a new class that extends the WebSocketConnectionProvider
- it can be an empty class, no need to override anything
- add the binding as above
- reload and check the network tab with WS filtering
- you will see 2 WS
- also you can override the createWebSocket, you can just call the super once, and put the breakpoint as described above..
Additional Information
- Operating System: Mac
- Theia Version: 1.43.1