Skip to content
Snippets Groups Projects
Commit 13a93ada authored by yf3's avatar yf3
Browse files

Update server.go

parent b97b0b46
No related branches found
No related tags found
No related merge requests found
Pipeline #132342 failed
...@@ -122,10 +122,10 @@ func (s *Server) HandleConnection(conn net.Conn) { ...@@ -122,10 +122,10 @@ func (s *Server) HandleConnection(conn net.Conn) {
var resultMap Action var resultMap Action
// parse resultMap to json format // parse resultMap to json format
err = json.Unmarshal(buf[0:n], &resultMap) err = json.Unmarshal(buf[0:n], &resultMap)
//if err != nil { if err != nil {
// fmt.Println("json error:", err) fmt.Println("json error:", err)
//
//} }
if resultMap.ActionType == EncodeActionType("Introduce") { if resultMap.ActionType == EncodeActionType("Introduce") {
s.ConnMutex.Lock() s.ConnMutex.Lock()
_, ok := s.EstablishedConns[resultMap.SenderIP]; _, ok := s.EstablishedConns[resultMap.SenderIP];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment