1
This commit is contained in:
@@ -158,7 +158,6 @@ func (t *TcpClient) HandleTcpMessages(printNo string) {
|
|||||||
if !t.isExistMsg(printNo) {
|
if !t.isExistMsg(printNo) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("HandleTcpMessages printNo: %s", printNo)
|
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -153,7 +153,6 @@ func (t *TcpClient) delConn(key string) {
|
|||||||
func (t *TcpClient) addConn(c net.Conn, key string, status int) {
|
func (t *TcpClient) addConn(c net.Conn, key string, status int) {
|
||||||
t.Lock()
|
t.Lock()
|
||||||
defer t.Unlock()
|
defer t.Unlock()
|
||||||
globals.SugarLogger.Debugf("addConn key: %s", key)
|
|
||||||
t.Clients[key] = &PrintInfo{
|
t.Clients[key] = &PrintInfo{
|
||||||
C: c,
|
C: c,
|
||||||
Status: status,
|
Status: status,
|
||||||
@@ -203,7 +202,6 @@ func (t *TcpClient) getPrintStatus(key string) int {
|
|||||||
func (t *TcpClient) getPrintConn(key string) net.Conn {
|
func (t *TcpClient) getPrintConn(key string) net.Conn {
|
||||||
t.RLock()
|
t.RLock()
|
||||||
defer t.RUnlock()
|
defer t.RUnlock()
|
||||||
globals.SugarLogger.Debugf("=====c :;= %s", utils.Format4Output(t.Clients, false))
|
|
||||||
if t.Clients[key] != nil {
|
if t.Clients[key] != nil {
|
||||||
return t.Clients[key].C
|
return t.Clients[key].C
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user