Explorar o código

httpserver keep-alive first attempt

Ondrej Pokorny %!s(int64=4) %!d(string=hai) anos
pai
achega
9d9128a747

+ 1 - 6
packages/fcl-net/src/ssockets.pp

@@ -491,16 +491,11 @@ var
   B: Byte;
   lTM: Integer;
 begin
-  // ToDo: support properly with the socket select() function
-  // currently a workaround
   lTM := IOTimeout;
   IOTimeout := TimeOut;
   FHandler.Recv(B,0);
   Result := FHandler.FLastError=0;
-  try
-    IOTimeout := lTM;
-  except
-  end;
+  IOTimeout := lTM;
 end;
 
 Function TSocketStream.Read (Var Buffer; Count : Longint) : longint;

+ 0 - 1
packages/fcl-web/src/base/fphttpserver.pp

@@ -85,7 +85,6 @@ Type
     Property Server : TFPCustomHTTPServer Read FServer;
     Property OnRequestError : TRequestErrorHandler Read FOnError Write FOnError;
     Property LookupHostNames : Boolean Read GetLookupHostNames;
-
     // Set to true if you want to support HTTP 1.1 connection: keep-alive - only available for threaded server
     Property EnableKeepAlive: Boolean read FEnableKeepAlive write FEnableKeepAlive;
     // time-out for keep-alive: how many ms should the server keep the connection alive after a request has been handled