mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 20:59:19 +02:00
Trojan: Do not panic when UDP dispatcher failed to write response (#153)
This commit is contained in:
parent
e254424c43
commit
96adf3fbca
|
@ -256,7 +256,10 @@ func (s *Server) handleUDPPayload(ctx context.Context, clientReader *PacketReade
|
||||||
if udpPayload.UDP == nil {
|
if udpPayload.UDP == nil {
|
||||||
udpPayload.UDP = &packet.Source
|
udpPayload.UDP = &packet.Source
|
||||||
}
|
}
|
||||||
common.Must(clientWriter.WriteMultiBuffer(buf.MultiBuffer{udpPayload}))
|
|
||||||
|
if err := clientWriter.WriteMultiBuffer(buf.MultiBuffer{udpPayload}); err != nil {
|
||||||
|
newError("failed to write response").Base(err).AtWarning().WriteToLog(session.ExportIDToError(ctx))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
|
|
Loading…
Reference in New Issue