mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-25 13:52:24 +02:00
Fix onConnect handler (#7265)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ import config from './config'
|
||||
export async function createPlatformClient (
|
||||
workspace: string,
|
||||
timeout: number,
|
||||
reconnect?: (event: ClientConnectEvent) => void
|
||||
reconnect?: (event: ClientConnectEvent, data: any) => Promise<void>
|
||||
): Promise<Client> {
|
||||
setMetadata(client.metadata.ClientSocketFactory, (url) => {
|
||||
return new WebSocket(url, {
|
||||
|
||||
@@ -1560,7 +1560,7 @@ export class GithubWorker implements IntegrationManager {
|
||||
ctx.info('Connecting to', { workspace: workspace.workspaceUrl, workspaceId: workspace.workspaceName })
|
||||
let client: Client | undefined
|
||||
try {
|
||||
client = await createPlatformClient(workspace.name, 30000, (event: ClientConnectEvent) => {
|
||||
client = await createPlatformClient(workspace.name, 30000, async (event: ClientConnectEvent) => {
|
||||
reconnect(workspace.name, event)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user