aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdelyn Breelove <[email protected]>2018-11-29 10:27:06 -0700
committerAdelyn Breelove <[email protected]>2018-11-29 10:27:06 -0700
commitb50ec1c46e8c73c7993898d52a567e1d662218cc (patch)
treef48bac0c0a910146dd6a91e0168a201ec02d1647 /lib
parenthopefully fixes the shard changes not propogating on reconnect (diff)
downloaddisml-b50ec1c46e8c73c7993898d52a567e1d662218cc.tar.xz
disml-b50ec1c46e8c73c7993898d52a567e1d662218cc.zip
Missed a couple things
Diffstat (limited to 'lib')
-rw-r--r--lib/sharder.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sharder.ml b/lib/sharder.ml
index 27b3b41..1deae72 100644
--- a/lib/sharder.ml
+++ b/lib/sharder.ml
@@ -263,15 +263,16 @@ let start ?count token =
let rec ev_loop t =
let (read, _) = t.shard.pipe in
Pipe.read read
- >>= fun frame ->
- (match parse frame with
+ >>| fun frame ->
+ let _ = match parse frame with
| Some f -> begin
handle_frame ~f t.shard
- >>| fun shard ->
+ >>> fun shard ->
t.shard <- shard;
- t
end
- | None -> recreate t.shard)
+ | None -> t.shard <- recreate t.shard;
+ in
+ t
>>= fun t ->
List.iter ~f:(fun f -> f t.shard) t.binds;
ev_loop t