Fix voor afsluiten verbinding...
This commit is contained in:
		
							parent
							
								
									ee3973a8c6
								
							
						
					
					
						commit
						c4e1851f42
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -41,7 +41,7 @@ bool DDV_write(void * buffer, int width, int count, int sock){ | |||
|   int todo = width*count; | ||||
|   while (sofar != todo){ | ||||
|     int r = send(sock, (char*)buffer + sofar, todo-sofar, 0); | ||||
|     if (r < 0){ | ||||
|     if (r <= 0){ | ||||
|       socketError = true; | ||||
|       printf("Could not write! %s\n", strerror(errno)); | ||||
|       return false; | ||||
|  | @ -56,7 +56,7 @@ bool DDV_read(void * buffer, int width, int count, int sock){ | |||
|   int todo = width*count; | ||||
|   while (sofar != todo){ | ||||
|     int r = recv(sock, (char*)buffer + sofar, todo-sofar, 0); | ||||
|     if (r < 0){ | ||||
|     if (r <= 0){ | ||||
|       socketError = true; | ||||
|       printf("Could not read! %s\n", strerror(errno)); | ||||
|       return false; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma