mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
copilot feedback addressed
This commit is contained in:
@@ -145,14 +145,12 @@ impl TunnelManager {
|
||||
}
|
||||
|
||||
fn generate_secret() -> String {
|
||||
let mut rng = rand::rng();
|
||||
let bytes: Vec<u8> = (0..32).map(|_| rand::Rng::random(&mut rng)).collect();
|
||||
let bytes: [u8; 32] = rand::random();
|
||||
hex::encode(bytes)
|
||||
}
|
||||
|
||||
fn generate_agent_id() -> String {
|
||||
let mut rng = rand::rng();
|
||||
let bytes: Vec<u8> = (0..16).map(|_| rand::Rng::random(&mut rng)).collect();
|
||||
let bytes: [u8; 16] = rand::random();
|
||||
hex::encode(bytes)
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,12 @@ export default function TunnelSection() {
|
||||
setShowQRModal(false);
|
||||
} catch (err) {
|
||||
setError(errorMessage(err, 'Failed to stop tunnel'));
|
||||
try {
|
||||
const status = await window.electron.getTunnelStatus();
|
||||
setTunnelStatus(status);
|
||||
} catch (statusErr) {
|
||||
console.error('Failed to fetch tunnel status after error:', statusErr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1282,7 +1282,7 @@ ipcMain.handle('get-tunnel-status', async () => {
|
||||
return await syncTunnelStatus(globalGoosedPort, SERVER_SECRET);
|
||||
} catch (error) {
|
||||
console.error('Error getting tunnel status:', error);
|
||||
return { state: 'error', info: null };
|
||||
return { state: 'error', info: null, auto_start: false };
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user