mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 19:33:32 +02:00
Trojan: Do not panic when UDP dispatcher failed to write response (#153)
This commit is contained in:
parent
e254424c43
commit
96adf3fbca
1 changed files with 4 additions and 1 deletions
|
@ -256,7 +256,10 @@ func (s *Server) handleUDPPayload(ctx context.Context, clientReader *PacketReade
|
|||
if udpPayload.UDP == nil {
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue