Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix credentials not being returned along with the request ID (#78)
Client expects credentials to be returned as a promise, but it can't match the response to the request due to response ID not being set: ```typescript if (packet.rid !== undefined) { // this is always false const request = this.requests.get(packet.rid) if (request != null) { this.requests.delete(packet.rid) if (packet.type === 'error') { request.reject(new SignalingError('server-error', packet.message)) } else { request.resolve(packet) } } } ``` This causes TURN to be completely broken since no credentials are available. Tested locally by hardcoding some creds: ```go func (c *CredentialsClient) GetCredentials(ctx context.Context) (*Credentials, error) { return &Credentials{ URL: "someURL", Username: "bsusername", Credential: "bspassword", Lifetime: 123, }, nil } ``` Happy to make adjustments as I have no experience in Go :)
- Loading branch information