Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions iocore/net/P_Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ struct Connection {

virtual ~Connection();
Connection();
Connection(Connection const &that) = delete;

/// Default options.
static NetVCOptions const DEFAULT_OPTIONS;
Expand All @@ -141,12 +142,16 @@ struct Connection {
*/
void move(Connection &);

private:
// Don't want copy constructors to avoid having the deconstructor on
// temporarily copies close the file descriptor too soon. Use move instead
Connection(Connection const &);

protected:
/** Assignment operator.
*
* @param that Source object.
* @return @a this
*
* This is protected because it is not safe in the general case, but is valid for
* certain subclasses. Those provide a public assignemnt that depends on this method.
*/
Connection &operator=(Connection const &that) = default;
void _cleanup();
};

Expand Down