mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Minor tweaks
This commit is contained in:
		
							parent
							
								
									aae570de2a
								
							
						
					
					
						commit
						79131bb959
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -249,7 +249,7 @@ func (a *admin) handleRequest(conn net.Conn) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Decode the input
 | 
							// Decode the input
 | 
				
			||||||
		if err := decoder.Decode(&recv); err != nil {
 | 
							if err := decoder.Decode(&recv); err != nil {
 | 
				
			||||||
			fmt.Println("Admin socket JSON decode error:", err)
 | 
							//	fmt.Println("Admin socket JSON decode error:", err)
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -272,6 +272,7 @@ func (a *admin) handleRequest(conn net.Conn) {
 | 
				
			||||||
					// Check if the field is missing
 | 
										// Check if the field is missing
 | 
				
			||||||
					if _, ok := recv[arg]; !ok {
 | 
										if _, ok := recv[arg]; !ok {
 | 
				
			||||||
						send = admin_info{
 | 
											send = admin_info{
 | 
				
			||||||
 | 
												"status":    "error",
 | 
				
			||||||
							"error":     "Expected field missing",
 | 
												"error":     "Expected field missing",
 | 
				
			||||||
							"expecting": arg,
 | 
												"expecting": arg,
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
| 
						 | 
					@ -300,7 +301,7 @@ func (a *admin) handleRequest(conn net.Conn) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Send the response back
 | 
							// Send the response back
 | 
				
			||||||
		if err := encoder.Encode(&send); err != nil {
 | 
							if err := encoder.Encode(&send); err != nil {
 | 
				
			||||||
			fmt.Println("Admin socket JSON encode error:", err)
 | 
							//	fmt.Println("Admin socket JSON encode error:", err)
 | 
				
			||||||
			return
 | 
								return
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue