소스 검색

drain replayed connection

Shelikhoo 5 년 전
부모
커밋
8f45736dd3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      proxy/vmess/encoding/server.go

+ 1 - 1
proxy/vmess/encoding/server.go

@@ -182,7 +182,7 @@ func (s *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.Request
 	sid.key = s.requestBodyKey
 	sid.nonce = s.requestBodyIV
 	if !s.sessionHistory.addIfNotExits(sid) {
-		return nil, newError("duplicated session id, possibly under replay attack")
+		return nil, drainConnection(newError("duplicated session id, possibly under replay attack"))
 	}
 
 	s.responseHeader = buffer.Byte(33)             // 1 byte