Commit graph

14 commits

Author SHA1 Message Date
Cnly 4e84c2f2e9 Docs and code cleanup
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-07-12 20:47:13 +08:00
Cnly 530ed11ecc Refine docs
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-28 01:32:23 +08:00
Cnly d79a6a21c7 Userstreams should store and use complete pos, not pos update ("pos delta")
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 05:10:31 +08:00
Cnly 274db2fbaf Fix zero value of currPos may be used in OnIncomingSyncRequest
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 05:00:48 +08:00
Cnly aeceacd917 Make Notifier.CurrentPosition() respect stream lock
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 04:33:45 +08:00
Cnly 74fd292403 Fix latest sync pos used as since pos in requestpool.go
Previously, currPos, obtained using notifier.CurrentPosition(), is passed
to GetNotifyChannel. Since this is already the latest position on the
server, the client won't get updates until (1) a even newer event arrives at
the server, or (2) the /sync request times out.

(2) above is possible because when it times out, notifier calculates
currentSyncForUser based on syncReq, which contains the correct since pos
token that the client sent the server.

Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-27 04:02:43 +08:00
Cnly 2a9dab21f8 Fix sync position with partial info used as complete one in syncserver and notifier
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 22:56:58 +08:00
Cnly badd360fe6 Add a simple test for EDU-only updates in notifier_test.go
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 18:00:50 +08:00
Cnly 18c59e68cd Fix more linting issues and docs
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 17:46:08 +08:00
Cnly e6870279ed Fix syncapi/sync/notifier_test.go
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-26 17:45:25 +08:00
Cnly e742b7d9b5 Add warning for OnNewEvent when no user to wake up
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 22:53:07 +08:00
Cnly 55a4e6061a Fix linting
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 22:22:03 +08:00
Cnly b896fdc537 Add typing notifications to /sync responses - fixes #635
Signed-off-by: Alex Chen <minecnly@gmail.com>
2019-06-25 15:28:52 +08:00
ruben 74827428bd use go module for dependencies (#594) 2019-05-21 21:56:55 +01:00