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 73e9492 commit 4694c0dCopy full SHA for 4694c0d
1 file changed
tunnel/tunnel.go
@@ -289,12 +289,13 @@ func (t *gtunnel) SetRoute(engine int) error {
289
290
func (t *gtunnel) Stat() (*x.NetStat, error) {
291
st, err := netstack.Stat(t.stack)
292
- st.TUNSt.Open = !t.closed.Load()
293
- st.TUNSt.Up = t.ep.IsAttached()
294
- st.TUNSt.Fd = t.ep.Cur()
295
- st.TUNSt.Mtu = int32(t.ep.MTU())
296
- st.TUNSt.PcapMode = t.pcapio.mode()
297
if err == nil && st != nil {
+ st.TUNSt.Open = !t.closed.Load()
+ st.TUNSt.Up = t.ep.IsAttached()
+ st.TUNSt.Fd = t.ep.Cur()
+ st.TUNSt.Mtu = int32(t.ep.MTU())
+ st.TUNSt.PcapMode = t.pcapio.mode()
298
+
299
if t := t.hdl.TCP(); t != nil {
300
st.RDNSIn.OpenConnsTCP = t.OpenConns()
301
}
0 commit comments