Commit 9a37b817 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2d01bfb2
...@@ -92,8 +92,8 @@ import ( ...@@ -92,8 +92,8 @@ import (
"sync" "sync"
"time" "time"
"lab.nexedi.com/kirr/neo/go/neo/proto"
"lab.nexedi.com/kirr/neo/go/internal/packed" "lab.nexedi.com/kirr/neo/go/internal/packed"
"lab.nexedi.com/kirr/neo/go/neo/proto"
"github.com/someonegg/gocontainer/rbuf" "github.com/someonegg/gocontainer/rbuf"
...@@ -319,7 +319,6 @@ func (c *Conn) reinit() { ...@@ -319,7 +319,6 @@ func (c *Conn) reinit() {
c.rxerrOnce = sync.Once{} // XXX ok? c.rxerrOnce = sync.Once{} // XXX ok?
// XXX vvv not strictly needed for light mode? // XXX vvv not strictly needed for light mode?
// ensureOpen(&c.rxdown) // ensureOpen(&c.rxdown)
c.rxdownOnce = sync.Once{} // XXX ok? c.rxdownOnce = sync.Once{} // XXX ok?
...@@ -372,7 +371,7 @@ func (link *NodeLink) _NewConn() (*Conn, error) { ...@@ -372,7 +371,7 @@ func (link *NodeLink) _NewConn() (*Conn, error) {
// nextConnId could wrap around uint32 limits - find first free slot to // nextConnId could wrap around uint32 limits - find first free slot to
// not blindly replace existing connection // not blindly replace existing connection
for i := uint32(0) ;; i++ { for i := uint32(0); ; i++ {
_, exists := link.connTab[link.nextConnId] _, exists := link.connTab[link.nextConnId]
if !exists { if !exists {
break break
...@@ -588,7 +587,7 @@ func (c *Conn) downRX(errMsg *proto.Error) { ...@@ -588,7 +587,7 @@ func (c *Conn) downRX(errMsg *proto.Error) {
// time to keep record of a closed connection so that we can properly reply // time to keep record of a closed connection so that we can properly reply
// "connection closed" if a packet comes in with same connID. // "connection closed" if a packet comes in with same connID.
var connKeepClosed = 1*time.Minute var connKeepClosed = 1 * time.Minute
// CloseRecv closes reading end of connection. // CloseRecv closes reading end of connection.
// //
...@@ -1311,7 +1310,7 @@ func (c *Conn) err(op string, e error) error { ...@@ -1311,7 +1310,7 @@ func (c *Conn) err(op string, e error) error {
// msgPack allocates pktBuf and encodes msg into it. // msgPack allocates pktBuf and encodes msg into it.
func msgPack(connId uint32, msg proto.Msg) *pktBuf { func msgPack(connId uint32, msg proto.Msg) *pktBuf {
l := msg.NEOMsgEncodedLen() l := msg.NEOMsgEncodedLen()
buf := pktAlloc(proto.PktHeaderLen+l) buf := pktAlloc(proto.PktHeaderLen + l)
h := buf.Header() h := buf.Header()
h.ConnId = packed.Hton32(connId) h.ConnId = packed.Hton32(connId)
......
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