releasble user validator

This commit is contained in:
v2ray committed 2016-04-25 18:39:30 +02:00
1 parent c044234e4a
commit 7db14dad9b
4 files changed
+70 -6

No files matched your search

+9
View File
@@ -30,6 +30,15 @@ func NewServerSession(validator protocol.UserValidator) *ServerSession {
}
}
func (this *ServerSession) Release() {
this.userValidator = nil
this.requestBodyIV = nil
this.requestBodyKey = nil
this.responseBodyIV = nil
this.responseBodyKey = nil
this.responseWriter = nil
}
func (this *ServerSession) DecodeRequestHeader(reader io.Reader) (*protocol.RequestHeader, error) {
buffer := alloc.NewSmallBuffer()
defer buffer.Release()