Commit 759b4f22 authored by AlexStocks's avatar AlexStocks

add timeout for writepkg

parent 139942f5
......@@ -164,9 +164,10 @@ func echo() {
pkg.H.Len = (uint16)(len(pkg.B)) + 1
if session := client.selectSession(); session != nil {
err := session.WritePkg(&pkg)
err := session.WritePkg(&pkg, conf.GettySessionParam.waitTimeout)
if err != nil {
log.Warn("session.WritePkg(session{%s}, pkg{%s}) = error{%v}", session.Stat(), pkg, err)
log.Warn("session.WritePkg(session{%s}, pkg{%s}, timeout{%d}) = error{%v}",
session.Stat(), pkg, conf.GettySessionParam.waitTimeout, err)
session.Close()
client.removeSession(session)
}
......
Markdown is supported
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