This commit is contained in:
Daniele Teti 2024-09-26 20:23:15 +02:00
commit dacdfe2ac3

View File

@ -134,13 +134,13 @@ begin
SSEMessage.Text := ASSEMessage;
if SSEMessage.IndexOfName('id')>-1 then
fLastEventId := SSEMessage.Values['id'].ToInteger;
fLastEventId := SSEMessage.Values['id'].Trim.ToInteger;
if SSEMessage.IndexOfName('event')>-1 then
event := SSEMessage.Values['event'];
event := SSEMessage.Values['event'].Trim;
if SSEMessage.IndexOfName('data')>-1 then
data := SSEMessage.Values['data'];
data := SSEMessage.Values['data'].Trim;
if SSEMessage.IndexOfName('retry')>-1 then
fReconnectTimeout := StrToIntDef(SSEMessage.Values['retry'], DefaultReconnectTimeout);
fReconnectTimeout := StrToIntDef(SSEMessage.Values['retry'].Trim, DefaultReconnectTimeout);
fOnSSEEvent(Self, fLastEventId, event, data);
finally