Fixed read() to not wait on closed socket
This commit is contained in:
		@@ -126,7 +126,7 @@ public:
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
      // TODO: Read directly into user buffer?
 | 
			
		||||
      if (!rx.size()) {
 | 
			
		||||
      if (!rx.size() && sock_connected) {
 | 
			
		||||
        at->maintain();
 | 
			
		||||
        //break;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -108,7 +108,7 @@ public:
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
      // TODO: Read directly into user buffer?
 | 
			
		||||
      if (!rx.size()) {
 | 
			
		||||
      if (!rx.size() && sock_connected) {
 | 
			
		||||
        at->maintain();
 | 
			
		||||
        //break;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ public:
 | 
			
		||||
        continue;
 | 
			
		||||
      }
 | 
			
		||||
      // TODO: Read directly into user buffer?
 | 
			
		||||
      if (!rx.size()) {
 | 
			
		||||
      if (!rx.size() && sock_connected) {
 | 
			
		||||
        at->maintain();
 | 
			
		||||
        //break;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user