Copyright 2014->2015
[folly.git] / folly / io / async / AsyncSocket.cpp
index c8754d2c73437a96b147c0bfc535dd70faf501b2..3906fffa403583b39473b8a7c405ec56e7fd4808 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -179,7 +179,7 @@ AsyncSocket::AsyncSocket()
   : eventBase_(nullptr)
   , writeTimeout_(this, nullptr)
   , ioHandler_(this, nullptr) {
-  VLOG(5) << "new AsyncSocket(" << ")";
+  VLOG(5) << "new AsyncSocket()";
   init();
 }
 
@@ -194,11 +194,7 @@ AsyncSocket::AsyncSocket(EventBase* evb)
 AsyncSocket::AsyncSocket(EventBase* evb,
                            const folly::SocketAddress& address,
                            uint32_t connectTimeout)
-  : eventBase_(evb)
-  , writeTimeout_(this, evb)
-  , ioHandler_(this, evb) {
-  VLOG(5) << "new AsyncSocket(" << this << ", evb=" << evb << ")";
-  init();
+  : AsyncSocket(evb) {
   connect(nullptr, address, connectTimeout);
 }
 
@@ -206,11 +202,7 @@ AsyncSocket::AsyncSocket(EventBase* evb,
                            const std::string& ip,
                            uint16_t port,
                            uint32_t connectTimeout)
-  : eventBase_(evb)
-  , writeTimeout_(this, evb)
-  , ioHandler_(this, evb) {
-  VLOG(5) << "new AsyncSocket(" << this << ", evb=" << evb << ")";
-  init();
+  : AsyncSocket(evb) {
   connect(nullptr, ip, port, connectTimeout);
 }