Fix format bug
authorDave Watson <davejwatson@fb.com>
Thu, 13 Nov 2014 20:31:47 +0000 (12:31 -0800)
committerDave Watson <davejwatson@fb.com>
Wed, 19 Nov 2014 20:52:30 +0000 (12:52 -0800)
Summary: Fix addition bug instead of string concat

Test Plan: ?? It compiles?  The only call paths are when syscalls fail, it would be a lot of work to stub them out

Reviewed By: mshneer@fb.com

Subscribers: trunkagent, doug, njormrod, folly-diffs@

FB internal diff: D1679713

Tasks: 5604354

Signature: t1:1679713:1415925209:ed05d3d1ce3e7e8db32c4afc86c5f24748d9c65b

folly/io/async/AsyncServerSocket.cpp

index 7dce10c1c6d6155eaf33cddb96ef35a6b0a386c0..4f2e39bb591d183becaa27b77dbae4bccf652bfc 100644 (file)
@@ -764,7 +764,8 @@ void AsyncServerSocket::dispatchError(const char *msgstr, int errnoValue) {
   while (true) {
     // Short circuit if the callback is in the primary EventBase thread
     if (info->eventBase == nullptr) {
-      std::runtime_error ex(msgstr + errnoValue);
+      std::runtime_error ex(
+        std::string(msgstr) +  folly::to<std::string>(errnoValue));
       info->callback->acceptError(ex);
       return;
     }