Skip to content

Commit

Permalink
local sync
Browse files Browse the repository at this point in the history
  • Loading branch information
andremussche committed Jan 2, 2014
1 parent 86dc2bf commit 7a59f2b
Show file tree
Hide file tree
Showing 3 changed files with 335 additions and 318 deletions.
2 changes: 1 addition & 1 deletion IdIOHandlerWebsocket.pas
Expand Up @@ -246,7 +246,7 @@ function TIdIOHandlerWebsocket.InternalReadDataFromSource(
if ARaiseExceptionOnTimeout then
EIdReadTimeout.Toss(RSIdNoDataToRead) //exit, no data can be received
else
Exit;
Exit(0);
end;

SetLength(VBuffer, RecvBufferSize);
Expand Down
6 changes: 2 additions & 4 deletions IdSocketIOHandling.pas
Expand Up @@ -584,6 +584,8 @@ procedure TIdBaseSocketIOHandling.ProcessSocketIORequest(
errorref: TSocketIOError;
error: ISuperObject;
begin
if ASocket = nil then Exit;

if not FConnections.ContainsValue(ASocket) and
not FConnectionsGUID.ContainsValue(ASocket) then
begin
Expand Down Expand Up @@ -1258,8 +1260,6 @@ procedure TIdSocketIOHandling.Send(const aMessage: string;
for context in FConnections.Values do
begin
if context.IsDisconnected then Continue;
// if not context.IsSocketIO then
// raise EIdSocketIoUnhandledMessage.Create('Not a socket.io connection!');

if not Assigned(aCallback) then
WriteSocketIOMsg(context, ''{no room}, aMessage, nil)
Expand All @@ -1274,8 +1274,6 @@ procedure TIdSocketIOHandling.Send(const aMessage: string;
for context in FConnectionsGUID.Values do
begin
if context.IsDisconnected then Continue;
// if not context.IsSocketIO then
// raise EIdSocketIoUnhandledMessage.Create('Not a socket.io connection!');

if not Assigned(aCallback) then
WriteSocketIOMsg(context, ''{no room}, aMessage, nil)
Expand Down

0 comments on commit 7a59f2b

Please sign in to comment.