Skip to content
Snippets Groups Projects
Commit 8d430175 authored by fangyincheng's avatar fangyincheng
Browse files

Mod:go mod & import & const

parent 56c5c124
No related branches found
No related tags found
No related merge requests found
package dubbo
import (
"github.com/dubbo/dubbo-go/server"
"time"
)
import (
"github.com/dubbo/dubbo-go/server"
jerrors "github.com/juju/errors"
)
......
......@@ -14,6 +14,9 @@ import (
jerrors "github.com/juju/errors"
)
// todo: WritePkg_Timeout will entry *.yml
const WritePkg_Timeout = 5*time.Second
var (
errTooManySessions = jerrors.New("too many sessions")
)
......@@ -280,7 +283,7 @@ func (h *RpcServerHandler) reply(session getty.Session, req *DubboPackage, tp he
resp.Body = nil
}
if err := session.WritePkg(resp, 10*time.Second); err != nil {
if err := session.WritePkg(resp, WritePkg_Timeout); err != nil {
log.Error("WritePkg error: %#v, %#v", jerrors.Trace(err), req.Header)
}
}
......@@ -4,9 +4,8 @@ require (
github.com/AlexStocks/getty v0.0.0-20190331201845-1ca64ac5a589
github.com/AlexStocks/goext v0.3.2
github.com/AlexStocks/log4go v1.0.2
github.com/dubbogo/hessian2 v0.0.0-20190331022028-ade83b794bf2
github.com/dubbogo/hessian2 v0.0.0-20190405234732-5b4d49312622
github.com/juju/errors v0.0.0-20190207033735-e65537c515d7
github.com/pkg/errors v0.8.1
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec
gopkg.in/yaml.v2 v2.2.2
)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment