JanWielemaker / swi-chat

Demo SWI-Prolog HTTP based chat server
19 stars 12 forks source link

Timing bug #1

Closed torbjornlager closed 10 years ago

torbjornlager commented 10 years ago

I consult:

:- use_module(library(http/websocket)).

test(T) :-
    http_open_websocket('http://localhost:3050/chat', WebSocket, []),
    ws_send(WebSocket, text(test)),
    sleep(T),
    ws_send(WebSocket, text(test)).

but when doing

?- test(0).

I see only one "test" written to the browser chat window.

When doing:

?- test(0.1).

I see two.

JanWielemaker commented 10 years ago

Thanks. Fixed in the current SWI-Prolog development git (i.e., requires Prolog from git).