add router handler & connector
This commit is contained in:
@@ -25,7 +25,7 @@ type conn struct {
|
||||
}
|
||||
|
||||
func WrapConn(c net.Conn, pStats stats.Stats) net.Conn {
|
||||
if pStats == nil {
|
||||
if c == nil || pStats == nil {
|
||||
return c
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type readWriter struct {
|
||||
}
|
||||
|
||||
func WrapReadWriter(rw io.ReadWriter, stats stats.Stats) io.ReadWriter {
|
||||
if stats == nil {
|
||||
if rw == nil || stats == nil {
|
||||
return rw
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user