Browse Source

fcl-web: clean up

mattias 3 years ago
parent
commit
4503070f7f
1 changed files with 1 additions and 6 deletions
  1. 1 6
      packages/fcl-web/src/websocket/fpwebsocket.pp

+ 1 - 6
packages/fcl-web/src/websocket/fpwebsocket.pp

@@ -666,7 +666,7 @@ begin
   aPos := 0;
   aPos := 0;
   SetLength(aBytes, aCount);
   SetLength(aBytes, aCount);
   repeat
   repeat
-    SetLength(buf, aCount);
+    SetLength(buf{%H-}, aCount);
     Result := FSocket.Read(buf[0], aCount - aPos);
     Result := FSocket.Read(buf[0], aCount - aPos);
     if Result <= 0 then
     if Result <= 0 then
       break;
       break;
@@ -699,7 +699,6 @@ end;
 { TWSMessage }
 { TWSMessage }
 
 
 function TWSMessage.GetAsString: UTF8String;
 function TWSMessage.GetAsString: UTF8String;
-
 begin
 begin
   Result:=TEncoding.UTF8.GetString(Payload);
   Result:=TEncoding.UTF8.GetString(Payload);
 end;
 end;
@@ -947,10 +946,6 @@ end;
 { TWSFrame }
 { TWSFrame }
 
 
 constructor TWSFrame.Create(aType: TFrameType; aIsFinal: Boolean; APayload: TBytes; aMask: Integer=0);
 constructor TWSFrame.Create(aType: TFrameType; aIsFinal: Boolean; APayload: TBytes; aMask: Integer=0);
-
-var
-  closeData: TBytes;
-
 begin
 begin
   Create(aType,aIsFinal,aMask);
   Create(aType,aIsFinal,aMask);