doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
729 stars 125 forks source link

Form Freeze after Connect to Socket #227

Open SapiZonk opened 2 years ago

SapiZonk commented 2 years ago

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.

doghappy commented 2 years ago

Can you create a reproducible repo? Thank u