mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
log err for SetReadDeadline(). fix #707
This commit is contained in:
parent
0dbfb66126
commit
5a6022d1ed
@ -174,7 +174,7 @@ func transferResponse(timer signal.ActivityUpdater, session *encoding.ServerSess
|
|||||||
// Process implements proxy.Inbound.Process().
|
// Process implements proxy.Inbound.Process().
|
||||||
func (v *Handler) Process(ctx context.Context, network net.Network, connection internet.Connection, dispatcher dispatcher.Interface) error {
|
func (v *Handler) Process(ctx context.Context, network net.Network, connection internet.Connection, dispatcher dispatcher.Interface) error {
|
||||||
if err := connection.SetReadDeadline(time.Now().Add(time.Second * 8)); err != nil {
|
if err := connection.SetReadDeadline(time.Now().Add(time.Second * 8)); err != nil {
|
||||||
return err
|
return newError("unable to set read deadline").Base(err).AtWarning()
|
||||||
}
|
}
|
||||||
|
|
||||||
reader := buf.NewBufferedReader(buf.NewReader(connection))
|
reader := buf.NewBufferedReader(buf.NewReader(connection))
|
||||||
@ -198,7 +198,9 @@ func (v *Handler) Process(ctx context.Context, network net.Network, connection i
|
|||||||
log.Access(connection.RemoteAddr(), request.Destination(), log.AccessAccepted, "")
|
log.Access(connection.RemoteAddr(), request.Destination(), log.AccessAccepted, "")
|
||||||
log.Trace(newError("received request for ", request.Destination()))
|
log.Trace(newError("received request for ", request.Destination()))
|
||||||
|
|
||||||
common.Must(connection.SetReadDeadline(time.Time{}))
|
if err := connection.SetReadDeadline(time.Time{}); err != nil {
|
||||||
|
log.Trace(newError("unable to set back read deadline").Base(err))
|
||||||
|
}
|
||||||
|
|
||||||
userSettings := request.User.GetSettings()
|
userSettings := request.User.GetSettings()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user