Skip to content

Commit

Permalink
In the future send better initialize message when the file store is i…
Browse files Browse the repository at this point in the history
…nactive
  • Loading branch information
rehno-lindeque committed Jun 5, 2012
1 parent d36826a commit d59cd16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/WebsocketApp.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ websocketApp clients fileStore serverMessages clientMessages req = do
liftIO $ putStrLn $ "Client connected (TODO: lookup client)..."

-- Send the list of files currently in the file store to the client application
-- TODO: There's a synchronization issue here: if a file is loaded it will be added to the file store
-- before the LOAD message is sent to the client.
-- The file store should be updated by the message processing queue, not by the FileObserver!
-- TODO: Read an "active" flag from the file store.
-- If the file store is not active, then send ReloadFiles LostRootDirectory or similar instead
files <- liftIO $ STM.FileStore.contents fileStore
sendMessage $ ReloadFiles Connected files

Expand Down

0 comments on commit d59cd16

Please sign in to comment.