Commit graph

2 commits

Author SHA1 Message Date
Andrew Lytvynov be8d931877 Fix a data race in utils.SyncBuffer
`SyncBuffer` has a goroutine running `io.Copy` to read from the
underlying pipe. Close stops the pipe, but doesn't wait for the last
chunk of data to be written by `io.Copy` to the buffer.

Both `Bytes` and `String` assume that the buffer received no further
writes after `Close`.

Add explicit synchronization between `io.Copy` goroutine and `Close`.
2020-04-17 20:05:38 +00:00
Sasha Klizhentas 95dcc8bbe7 Introduce disconnect client logic.
This commit implements #1935, fixes #2038

Auth server now supports global
defaults for timeout behavior:

```
auth_service:
  client_idle_timeout:  15m
  disconnect_expired_cert: no
```

New role options were introduced:

```
kind: role
version: v3
metadata:
  name: intern
  spec:
    options:
    # these two settings override the global ones:
    client_idle_timeout:  1m
    disconnect_expired_cert: yes
```
2018-07-12 19:00:13 -07:00