we hawt
This commit is contained in:
parent
86d77d23bb
commit
8adcd08daf
@ -32,6 +32,11 @@ struct Connection {
|
||||
impl Handler for Connection {
|
||||
fn on_open(&mut self, _: ws::Handshake) -> ws::Result<()> {
|
||||
info!("connected account={:?}", self.account);
|
||||
|
||||
if let Some(ref a) = self.account {
|
||||
self.ws.send(RpcMessage::AccountState(a.clone())).unwrap();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -104,7 +109,10 @@ pub fn start(pool: PgPool, events: Events) {
|
||||
let response = to_vec(&n).unwrap();
|
||||
out.send(Message::Binary(response)).unwrap();
|
||||
}
|
||||
Err(_) => (),
|
||||
// we done
|
||||
Err(_e) => {
|
||||
break;
|
||||
},
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user