And here I thought re-using the message was clever. That generates a
nice exception and crashes the program.
Signed-off-by: Keith Packard <keithp@keithp.com>
/* On connect, send the current state to the new client
*/
/* On connect, send the current state to the new client
*/
- send_to_client(client, message());
+ send_to_client(client);
/* If we've got an address from a previous session, then
* go ahead and try to reconnect to the device
/* If we've got an address from a previous session, then
* go ahead and try to reconnect to the device
- private void send_to_client(Messenger client, Message m) {
+ private void send_to_client(Messenger client) {
+ Message m = message();
try {
client.send(m);
} catch (RemoteException e) {
try {
client.send(m);
} catch (RemoteException e) {
}
private void send_to_clients() {
}
private void send_to_clients() {
for (Messenger client : clients)
for (Messenger client : clients)
- send_to_client(client, m);
+ send_to_client(client);
}
private void disconnect(boolean notify) {
}
private void disconnect(boolean notify) {