mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-11 18:54:23 +00:00
Set TCP socket options before upgrading connection
This commit is contained in:
parent
6a22e6c9de
commit
cd77727c1e
@ -355,6 +355,7 @@ func (t *tcp) call(saddr string, options interface{}, sintf string, upgrade *Tcp
|
|||||||
func (t *tcp) handler(sock net.Conn, incoming bool, options interface{}, upgrade *TcpUpgrade) {
|
func (t *tcp) handler(sock net.Conn, incoming bool, options interface{}, upgrade *TcpUpgrade) {
|
||||||
defer t.waitgroup.Done() // Happens after sock.close
|
defer t.waitgroup.Done() // Happens after sock.close
|
||||||
defer sock.Close()
|
defer sock.Close()
|
||||||
|
t.setExtraOptions(sock)
|
||||||
var upgraded bool
|
var upgraded bool
|
||||||
if upgrade != nil {
|
if upgrade != nil {
|
||||||
var err error
|
var err error
|
||||||
@ -365,7 +366,6 @@ func (t *tcp) handler(sock net.Conn, incoming bool, options interface{}, upgrade
|
|||||||
upgraded = true
|
upgraded = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t.setExtraOptions(sock)
|
|
||||||
stream := stream{}
|
stream := stream{}
|
||||||
stream.init(sock)
|
stream.init(sock)
|
||||||
var name, proto, local, remote string
|
var name, proto, local, remote string
|
||||||
|
Loading…
Reference in New Issue
Block a user