-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: re-implement web-socket server using a core.async channel as queue
Previous implementation has been calling http/on-receive too late. It could happen that client sends a message too quickly after opening a connection that we could sometimes miss it. New approach registers http/on-close and http/on-receive ASAP. But instead of processing messages right away it is putting them on core.async channel. When we are ready after accepting client connection and have all initialisation set up, we can start processing jobs on the channel asynchronously.
- Loading branch information
Showing
1 changed file
with
54 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters