Clean dirty code

This commit is contained in:
wweir
2019-01-15 08:04:54 +08:00
parent b050e312b2
commit e0de537042
2 changed files with 13 additions and 10 deletions
+6 -5
View File
@@ -16,11 +16,12 @@ type client struct {
func NewClient() *client {
return &client{
// conf: &quic.Config{
// HandshakeTimeout: 5 * time.Second,
// MaxIncomingStreams: 1024,
// KeepAlive: true,
// },
conf: &quic.Config{
HandshakeTimeout: 5 * time.Second,
MaxIncomingStreams: 1024,
KeepAlive: true,
IdleTimeout: 30 * time.Second,
},
}
}
+7 -5
View File
@@ -2,6 +2,7 @@ package quic
import (
"net"
"time"
"github.com/golang/glog"
quic "github.com/lucas-clemente/quic-go"
@@ -14,11 +15,12 @@ type server struct {
func NewServer() *server {
return &server{
// conf: &quic.Config{
// HandshakeTimeout: 5 * time.Second,
// MaxIncomingStreams: 1024,
// KeepAlive: true,
// },
conf: &quic.Config{
HandshakeTimeout: 5 * time.Second,
MaxIncomingStreams: 1024,
KeepAlive: true,
IdleTimeout: 30 * time.Second,
},
}
}