mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
support quic options (#3211)
This commit is contained in:
@@ -147,7 +147,7 @@ func (ctl *Control) HandleReqWorkConn(inMsg *msg.ReqWorkConn) {
|
||||
|
||||
var startMsg msg.StartWorkConn
|
||||
if err = msg.ReadMsgInto(workConn, &startMsg); err != nil {
|
||||
xl.Error("work connection closed before response StartWorkConn message: %v", err)
|
||||
xl.Trace("work connection closed before response StartWorkConn message: %v", err)
|
||||
workConn.Close()
|
||||
return
|
||||
}
|
||||
|
@@ -374,7 +374,11 @@ func (cm *ConnectionManager) OpenConnection() error {
|
||||
|
||||
conn, err := quic.DialAddr(
|
||||
net.JoinHostPort(cm.cfg.ServerAddr, strconv.Itoa(cm.cfg.ServerPort)),
|
||||
tlsConfig, nil)
|
||||
tlsConfig, &quic.Config{
|
||||
MaxIdleTimeout: time.Duration(cm.cfg.QUICMaxIdleTimeout) * time.Second,
|
||||
MaxIncomingStreams: int64(cm.cfg.QUICMaxIncomingStreams),
|
||||
KeepAlivePeriod: time.Duration(cm.cfg.QUICKeepalivePeriod) * time.Second,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user