From 0e1fc06a6f3b5c7aaa06ba370f85337176ae8a85 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 1 Apr 2014 15:55:05 -0700 Subject: The remove paths on send fail thing in Peer.cpp was not well thought out, and there is no point in mallocing the TCP write buffer. --- node/TcpSocket.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'node/TcpSocket.hpp') diff --git a/node/TcpSocket.hpp b/node/TcpSocket.hpp index 8a9a7095..59d1ec0b 100644 --- a/node/TcpSocket.hpp +++ b/node/TcpSocket.hpp @@ -78,10 +78,8 @@ protected: Socket(t,s), _lastActivity(Utils::now()), _sm(sm), - _outbuf((unsigned char *)0), - _outptr(0), - _outbufsize(0), _inptr(0), + _outptr(0), _connecting(c), _remote(r) { @@ -93,12 +91,11 @@ protected: private: unsigned char _inbuf[ZT_SOCKET_MAX_MESSAGE_LEN]; + unsigned char _outbuf[ZT_SOCKET_MAX_MESSAGE_LEN * 4]; uint64_t _lastActivity; // updated whenever data is received, checked directly by SocketManager for stale TCP cleanup SocketManager *_sm; - unsigned char *_outbuf; - unsigned int _outptr; - unsigned int _outbufsize; unsigned int _inptr; + unsigned int _outptr; bool _connecting; // manipulated directly by SocketManager, true if connect() is in progress InetAddress _remote; Mutex _writeLock; -- cgit v1.2.3