1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-25 05:16:09 -04:00

log err for SetReadDeadline(). fix #707

This commit is contained in:
Darien Raymond 2017-11-15 01:14:02 +01:00
parent 0dbfb66126
commit 5a6022d1ed
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -174,7 +174,7 @@ func transferResponse(timer signal.ActivityUpdater, session *encoding.ServerSess
// Process implements proxy.Inbound.Process().
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 {
return err
return newError("unable to set read deadline").Base(err).AtWarning()
}
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.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()