(patch: Partial<AgentSourceStatus>)
| 188 | let timer: ReturnType<typeof setTimeout> | undefined; |
| 189 | |
| 190 | const announce = (patch: Partial<AgentSourceStatus>): void => { |
| 191 | setSource((current) => ({ project, value: { |
| 192 | ...(current.project === project ? current.value : { state: 'connecting', hello: undefined, error: '' }), |
| 193 | origin, |
| 194 | requests: requests.current, |
| 195 | drops: drops.current, |
| 196 | ...patch, |
| 197 | } })); |
| 198 | }; |
| 199 | |
| 200 | const connect = async (): Promise<void> => { |
| 201 | if (stopped) { |