mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-17 21:16:33 +02:00
Add missing lock call for timeouts in waiter methods.
This commit is contained in:
parent
6e9a36a434
commit
a1f62ffd18
|
@ -315,6 +315,7 @@ func (c *TestClient) WaitForClientRemoved(ctx context.Context) error {
|
||||||
c.hub.mu.Unlock()
|
c.hub.mu.Unlock()
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
c.hub.mu.Lock()
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
default:
|
default:
|
||||||
time.Sleep(time.Millisecond)
|
time.Sleep(time.Millisecond)
|
||||||
|
@ -341,6 +342,7 @@ func (c *TestClient) WaitForSessionRemoved(ctx context.Context, sessionId string
|
||||||
c.hub.mu.Unlock()
|
c.hub.mu.Unlock()
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
c.hub.mu.Lock()
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
default:
|
default:
|
||||||
time.Sleep(time.Millisecond)
|
time.Sleep(time.Millisecond)
|
||||||
|
|
Loading…
Reference in a new issue