mirror of
https://github.com/wweir/sower.git
synced 2024-04-21 12:42:15 +00:00
Clean dirty code
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user