TMSFNCWebSocketServer occasionally gets: Count not bind socket

This "could not bind socket" error seems to be occurring more frequently as of late and not sure why. Here is the call stack reported by EurekaLog:

Could not bind socket.
[00007FF783C5955D] System.SysUtils.Exception.RaiseOuterException (Line 24478, "System.SysUtils.pas")
[00007FF785C045E4] IdGlobal.IndyRaiseOuterException (Line 4772, "IdGlobal.pas")
[00007FF785C373D9] IdSocketHandle.TIdSocketHandle.Bind (Line 427, "IdSocketHandle.pas")
[00007FF786717B54] IdCustomTCPServer.TIdCustomTCPServer.StartListening (Line 789, "IdCustomTCPServer.pas")
[00007FF78671847F] IdCustomTCPServer.TIdCustomTCPServer.Startup (Line 1055, "IdCustomTCPServer.pas")
[00007FF786720A3B] IdCustomHTTPServer.TIdCustomHTTPServer.Startup (Line 1628, "IdCustomHTTPServer.pas")
[00007FF7867177A6] IdCustomTCPServer.TIdCustomTCPServer.SetActive (Line 619, "IdCustomTCPServer.pas")
[00007FF786732645] VCL.TMSFNCWebSocketServer.TTMSFNCCustomWebSocketServer.SetActive (Line 665, "VCL.TMSFNCWebSocketServer.pas")
[00007FF78673C0CE] Frame.MobileTransfer.TframeMobileTransfer.SetParent (Line 211, "Frame.MobileTransfer.pas")
[00007FF786742EC6] Form.DataManager.TfrmDataManager.ShowFrame (Line 323, "Form.DataManager.pas")

We have this component in a frame, which I assume gets destroyed when we close the parent form. We use this component to transfer data between Windows and our mobile app. Typically it works perfectly with no issues, so not sure why we get this error on occasion.

Any thoughts? I just updated all my TMS components to see if it helps,

Hi,

Could be related to the frame destroying but it's unclear at this moment. We'll need to try to reproduce this here locally to investigate what goes wrong. Would it be a possiblity to provide us a small sample that has this issue to speed things up?

I'll see what I can do about getting you an example, but might be a while (time is at a premium). It happens so rarely but when it does it seems we have to reboot to clear it, so I currently don't know how to readily reproduce it. TIdUDPClient/Server components have a property called ReuseSocket, but I don't see that with your WebsocketServer component.

I just now added explicit code in the parent form to be sure to set the websocket server to be inactive on form close as well as on form destroy events. Maybe it will help.