socket.io-client-csharp icon indicating copy to clipboard operation
socket.io-client-csharp copied to clipboard

Form Freeze after Connect to Socket

Open SapiZonk opened this issue 4 years ago • 1 comments

Hi...

I use SocketIOClient" version="3.0.3" in Desktop Application (VB.NET)

This is my Code

Private Async Sub frmSocketIO_Load(sender As Object, e As EventArgs) Handles MyBase.Load
     Client = New SocketIO(sLINK_WAGW, New SocketIOOptions With {.EIO = 4})
     Client.ClientWebSocketProvider = Function() New ClientWebSocketManaged()

     Client.On("init", Function(response)
                              Dim jarr As Linq.JArray = Linq.JArray.Parse(response.GetValue(0).ToString())
                              For Each jtk As JToken In jarr
                                  If sAktivasiKey = jtk.SelectToken("id") Then
                                      If jtk.SelectToken("ready").ToString = True Then
                                          lblStatusWA.Text = "CONNECTED"
                                          PicQR.Image = My.Resources.UpdateGif

                                          Me.Hide()
                                      End If
                                  End If
                              Next
                          End Function)

     Await Client.ConnectAsync()
End Sub

After Connected to server, i try to move the Form ( Hide the Form ). But the Form get FREEZE. how can i fix it?

Thanks.

SapiZonk avatar Oct 06 '21 16:10 SapiZonk

Can you create a reproducible repo? Thank u

doghappy avatar Oct 10 '21 06:10 doghappy