You are not logged in.
Delphi 11, win32 target, mormot2
A TRestHttpServer with two TRestServerDB/WebSocketsEnable
when destroying it:
srv.shutdown; (the TRestHttpServer)
srvdb.Free; (one TRestServerDB)
oper.Free; (second TRestServerDB)
srv.free;
The TRestHttpServer hangs at file mormot.net.ws.async, line 597,
// use TWebSocketAsyncConnection.SendDirect for non-blocking socket sending
if aClientsConnectionID = nil then
// broadcast to all connected clients
for i := 0 to fAsync.ConnectionCount - 1 do
inc(result, ord(TWebSocketAsyncConnection(fAsync.Connection[i]).
SendDirect(tmp, aFrame.opcode, aTimeOut)))
In the logs,
HTTP: 20220213 17480325 http mormot.rest.http.server.TRestHttpServer(11686740) {"TWebSocketAsyncServerRest(11a9bd80)":{ApiVersion:"WinSock 2.0.514",ServerName:"mORMot2 (Win)",ProcessName:"ppp/srv ppp/oper",SockPort:"0.0.0.0:50480",ServerKeepAliveTimeOut:30000,StatHeaderProcessed:4,StatBodyProcessed:1,StatUpgraded:1,HeadersDefaultBufferSize:2048,Async:{"TWebSocketAsyncConnections(08828170)":{ThreadPoolCount:32,ConnectionCount:1,ConnectionHigh:2,Clients:{"TAsyncConnectionsSockets(111b27c0)":{Count:1,ReadCount:23,WriteCount:23,ReadBytes:3798,WriteBytes:2838962,Total:2}},Server:{"TCrtSocket(0b205d50)":{Server:"0.0.0.0",Port:"50480",RawSocket:1396,TimeOut:10000}},Accepted:2,MaxConnections:7777777,MaxPending:10000}}}} finalized for 2 servers
Warning: 20220213 17480640 warn mormot.net.ws.async.TWebSocketAsyncConnection(112ba170) AfterWrite: unexpected hrsGetCommand]
Thank you in advance
Offline
Do you use them from WS clients, or regular REST clients?
forgot to tell
From Regular rest clients is OK. This happens with Websocket clients connected before.
Offline
Offline
It works OK now. Thanks @ab
Offline