feat: client connect & disconnect log for server

This commit is contained in:
Toby
2022-01-21 17:21:56 -08:00
parent 80b1ce33a2
commit 013e44a9c5
4 changed files with 36 additions and 10 deletions

View File

@@ -64,7 +64,7 @@ func newServerClient(cs quic.Session, transport transport.Transport, auth []byte
return sc
}
func (c *serverClient) Run() {
func (c *serverClient) Run() error {
if !c.DisableUDP {
go func() {
for {
@@ -79,7 +79,7 @@ func (c *serverClient) Run() {
for {
stream, err := c.CS.AcceptStream(context.Background())
if err != nil {
break
return err
}
if c.ConnGauge != nil {
c.ConnGauge.Inc()