more correct open/close code
This commit is contained in:
parent
7f03038bf4
commit
2801019c5c
@ -53,18 +53,18 @@ type ipcCommon struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ipc *ipcCommon) readConn() {
|
func (ipc *ipcCommon) readConn() {
|
||||||
//scn := bufio.NewScanner(ipc.conn)
|
scn := bufio.NewScanner(ipc.conn)
|
||||||
//for scn.Scan() {
|
for scn.Scan() {
|
||||||
// var msg Message
|
var msg Message
|
||||||
// if err := json.Unmarshal(scn.Bytes(), &msg); err != nil {
|
if err := json.Unmarshal(scn.Bytes(), &msg); err != nil {
|
||||||
// ipc.raiseErr(fmt.Errorf("unmarshal message: %w", err))
|
ipc.raiseErr(fmt.Errorf("unmarshal message: %w", err))
|
||||||
// break
|
break
|
||||||
// }
|
}
|
||||||
// ipc.processMsg(msg)
|
ipc.processMsg(msg)
|
||||||
//}
|
}
|
||||||
//if err := scn.Err(); err != nil {
|
if err := scn.Err(); err != nil {
|
||||||
// ipc.raiseErr(err)
|
ipc.raiseErr(err)
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ipc *ipcCommon) processMsg(msg Message) {
|
func (ipc *ipcCommon) processMsg(msg Message) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user