Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26b0dca commit 9c4bcedCopy full SHA for 9c4bced
device/receive.go
@@ -633,14 +633,14 @@ func (peer *Peer) RoutineSequentialReceiver() {
633
634
offset := MessageTransportOffsetContent
635
_, err := device.tun.device.Write(elem.buffer[:offset+len(elem.packet)], offset)
636
+ if err != nil && !device.isClosed.Get() {
637
+ logError.Println("Failed to write packet to TUN device:", err)
638
+ }
639
if len(peer.queue.inbound) == 0 {
- err = device.tun.device.Flush()
640
+ err := device.tun.device.Flush()
641
if err != nil {
642
peer.device.log.Error.Printf("Unable to flush packets: %v", err)
643
}
644
- if err != nil && !device.isClosed.Get() {
- logError.Println("Failed to write packet to TUN device:", err)
- }
645
646
0 commit comments