aa
This commit is contained in:
@@ -56,7 +56,7 @@ func ListenTcp() {
|
||||
return
|
||||
}
|
||||
globals.SugarLogger.Debugf("begin listenTcp port 8000......")
|
||||
//go HandleTcpMessages()
|
||||
go HandleTcpMessages()
|
||||
for {
|
||||
c, err := l.Accept()
|
||||
if err != nil {
|
||||
@@ -173,6 +173,7 @@ func HandleTcpMessages() {
|
||||
printMsg.Comment = err.Error()
|
||||
dao.UpdateEntity(db, printMsg, "Status", "Comment")
|
||||
delete(tcpClient.Clients, printMsg.PrintNo)
|
||||
c.Close()
|
||||
} else {
|
||||
if c != nil {
|
||||
if _, err = c.Write(data); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user