稍微优化一下
This commit is contained in:
@@ -49,6 +49,7 @@ func (this *Tunnel) run() { //单向的,从src发送到dest
|
||||
cipherDirection := this.cipherDirection
|
||||
id := this.id
|
||||
defer func() {
|
||||
log.Info("tunnel id %s ends", id)
|
||||
if r := recover(); r != nil {
|
||||
if src != nil {
|
||||
src.Close()
|
||||
@@ -56,7 +57,6 @@ func (this *Tunnel) run() { //单向的,从src发送到dest
|
||||
if dest != nil {
|
||||
dest.Close()
|
||||
}
|
||||
|
||||
}
|
||||
}()
|
||||
cache := make([]byte, 1024*4) //4kB
|
||||
|
||||
Reference in New Issue
Block a user