mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-31 15:35:21 +01:00 
			
		
		
		
	connection: Remove unused timeout feature
Was only used for a unit test and incorrectly at that.
This commit is contained in:
		| @@ -1486,13 +1486,6 @@ bool Connection::ReceiveTimeoutMs(NetworkPacket *pkt, u32 timeout_ms) | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| void Connection::Receive(NetworkPacket *pkt) | ||||
| { | ||||
| 	bool any = ReceiveTimeoutMs(pkt, m_bc_receive_timeout); | ||||
| 	if (!any) | ||||
| 		throw NoIncomingDataException("No incoming data"); | ||||
| } | ||||
| 
 | ||||
| void Connection::Send(session_t peer_id, u8 channelnum, | ||||
| 		NetworkPacket *pkt, bool reliable) | ||||
| { | ||||
|   | ||||
| @@ -249,13 +249,11 @@ public: | ||||
| 
 | ||||
| 	void putCommand(ConnectionCommandPtr c); | ||||
| 
 | ||||
| 	void SetTimeoutMs(u32 timeout) { m_bc_receive_timeout = timeout; } | ||||
| 	void Serve(Address bind_addr); | ||||
| 	void Connect(Address address); | ||||
| 	bool Connected(); | ||||
| 	void Disconnect(); | ||||
| 	bool ReceiveTimeoutMs(NetworkPacket *pkt, u32 timeout_ms); | ||||
| 	void Receive(NetworkPacket *pkt); | ||||
| 	void Send(session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable); | ||||
| 	session_t GetPeerID() const { return m_peer_id; } | ||||
| 	Address GetPeerAddress(session_t peer_id); | ||||
| @@ -317,7 +315,6 @@ private: | ||||
| 
 | ||||
| 	// Backwards compatibility
 | ||||
| 	PeerHandler *m_bc_peerhandler; | ||||
| 	u32 m_bc_receive_timeout = 0; | ||||
| 
 | ||||
| 	bool m_shutting_down = false; | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user