Skip to content

Commit

Permalink
Merge pull request #207 from clrusby/minor_text_update
Browse files Browse the repository at this point in the history
Correct the string for IPv4 local/remote endpoints
  • Loading branch information
ben-crowhurst committed May 7, 2017
2 parents dc8f188 + ecc8283 commit b991616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/corvusoft/restbed/detail/socket_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ namespace restbed
}

auto address = endpoint.address( );
auto local = address.is_v4( ) ? address.to_string( ) : "[" + address.to_string( ) + "]:";
auto local = address.is_v4( ) ? address.to_string( ) + ":" : "[" + address.to_string( ) + "]:";
local += ::to_string( endpoint.port( ) );

return local;
Expand Down Expand Up @@ -476,7 +476,7 @@ namespace restbed
}

auto address = endpoint.address( );
auto remote = address.is_v4( ) ? address.to_string( ) : "[" + address.to_string( ) + "]:";
auto remote = address.is_v4( ) ? address.to_string( ) + ":" : "[" + address.to_string( ) + "]:";
remote += ::to_string( endpoint.port( ) );

return remote;
Expand Down

0 comments on commit b991616

Please sign in to comment.