diff --git a/lib/mongo/repl_set_connection.rb b/lib/mongo/repl_set_connection.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo/repl_set_connection.rb
+++ b/lib/mongo/repl_set_connection.rb
@@ -203,7 +203,7 @@ module Mongo
         end
 
         host, port = host.split(':')
-        [host, port.to_i]
+        [host, port ? port.to_i : Connection::DEFAULT_PORT]
       end
 
       # Replace the list of seed nodes with the canonical list.
Fix for when port isn't specified on rs nodes (Alex Stupka)