Browse Source
Wait for message to be actually sent on the wire
fix-bad-api-calls
Thomas Eizinger
3 years ago
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
2 changed files with
6 additions and
2 deletions
-
daemon/src/maker_cfd.rs
-
daemon/src/maker_inc_connections.rs
|
|
@ -289,12 +289,14 @@ impl Actor { |
|
|
|
.await |
|
|
|
.unwrap(); |
|
|
|
|
|
|
|
// use `.send` here to ensure we only continue once the message has been sent
|
|
|
|
self.takers |
|
|
|
.do_send_async(maker_inc_connections::TakerMessage { |
|
|
|
.send(maker_inc_connections::TakerMessage { |
|
|
|
taker_id, |
|
|
|
command: TakerCommand::NotifyOrderAccepted { id: msg.order_id }, |
|
|
|
}) |
|
|
|
.await?; |
|
|
|
|
|
|
|
self.cfd_feed_actor_inbox |
|
|
|
.send(load_all_cfds(&mut conn).await?)?; |
|
|
|
|
|
|
|
|
|
@ -61,7 +61,9 @@ impl Actor { |
|
|
|
.write_connections |
|
|
|
.get(&taker_id) |
|
|
|
.context("no connection to taker_id")?; |
|
|
|
conn.do_send_async(msg).await?; |
|
|
|
|
|
|
|
// use `.send` here to ensure we only continue once the message has been sent
|
|
|
|
conn.send(msg).await?; |
|
|
|
|
|
|
|
Ok(()) |
|
|
|
} |
|
|
|