Commit 9031ef52 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 60033406
...@@ -145,7 +145,7 @@ func (zl *zLink) Close() error { ...@@ -145,7 +145,7 @@ func (zl *zLink) Close() error {
// serveRecv handles receives from underlying link and dispatches them to calls // serveRecv handles receives from underlying link and dispatches them to calls
// waiting for results, to notify and serve handlers . // waiting for results, to notify and serve handlers.
func (zl *zLink) serveRecv() { func (zl *zLink) serveRecv() {
defer zl.serveWg.Done() defer zl.serveWg.Done()
for { for {
...@@ -216,7 +216,7 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error { ...@@ -216,7 +216,7 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error {
if f == nil { if f == nil {
// disconnect on call to unknown method // disconnect on call to unknown method
err = fmt.Errorf("unknown method %q", m.method) err = fmt.Errorf("unknown method %q", m.method)
// XXX error -> exception // TODO error -> exception
zl.reply(m.msgid, err) // ignore error zl.reply(m.msgid, err) // ignore error
return fmt.Errorf(".%d: %s", m.msgid, err) return fmt.Errorf(".%d: %s", m.msgid, err)
} }
...@@ -225,7 +225,7 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error { ...@@ -225,7 +225,7 @@ func (zl *zLink) serveRecv1(pkb *pktBuf) error {
defer zl.serveWg.Done() defer zl.serveWg.Done()
res := f(zl.serveCtx, m.arg) res := f(zl.serveCtx, m.arg)
// XXX error -> exception // TODO error -> exception
// send result back // send result back
err := zl.reply(m.msgid, res) err := zl.reply(m.msgid, res)
...@@ -378,7 +378,7 @@ func (zl *zLink) sendPkt(pkb *pktBuf) error { ...@@ -378,7 +378,7 @@ func (zl *zLink) sendPkt(pkb *pktBuf) error {
// recvPkt receives 1 raw ZEO packet. // recvPkt receives 1 raw ZEO packet.
// //
// the packet returned contains both header and payload. // the packet returned contains both header and payload.
// XXX almost dump from NEO. // XXX almost dup from NEO.
func (zl *zLink) recvPkt() (*pktBuf, error) { func (zl *zLink) recvPkt() (*pktBuf, error) {
pkb := allocPkb() pkb := allocPkb()
data := pkb.data[:cap(pkb.data)] data := pkb.data[:cap(pkb.data)]
......
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