Compile bug (#122)
* 1) IXWebSocketTransport: BUG: int type has no warranty of number of bits. It depends on compiler and architecture. In my system (64 bit) is 32 bit. 1 << 63 is bad idea in this case because the final number is 0 by overflow. The symptom observed is that the server can't receive messages. 2) IXSocketFactory: Compilation Warning: Variable not in use. * Better aproach suggested by Benjamin.
This commit is contained in:
		
				
					committed by
					
						 Benjamin Sergeant
						Benjamin Sergeant
					
				
			
			
				
	
			
			
			
						parent
						
							2cfadd93b5
						
					
				
				
					commit
					b946cda65e
				
			| @@ -31,6 +31,7 @@ namespace ix | ||||
|                                          std::string& errorMsg, | ||||
|                                          const SocketTLSOptions& tlsOptions) | ||||
|     { | ||||
|         (void) tlsOptions; | ||||
|         errorMsg.clear(); | ||||
|         std::shared_ptr<Socket> socket; | ||||
|  | ||||
|   | ||||
| @@ -543,7 +543,7 @@ namespace ix | ||||
|             } | ||||
|  | ||||
|             // Prevent integer overflow in the next conditional | ||||
|             const uint64_t maxFrameSize(1 << 63); | ||||
|             const uint64_t maxFrameSize(1ULL << 63); | ||||
|             if (ws.N > maxFrameSize) | ||||
|             { | ||||
|                 return; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user